This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arkanes
Recipients arkanes, christian.heimes, ntoronto
Date 2007-11-29.16:07:35
SpamBayes Score 0.035989773
Marked as misclassified No
Message-id <1196352457.71.0.275579090544.issue1518@psf.upfronthosting.co.za>
In-reply-to
Content
In funcobject.c:PyFunction_New, the declarations of op and __name__ need
to be moved to the top of the function to compile in MSVC, and if
accepted the fastglobals.c file needs to be added to PCBuild.

In the test script, the use of import * generates syntax warnings that
make the output awkward to read, and the benchmark for dict_get is
actually running dict_set. I'm attaching the fixed copy of the test
script I used.

I see roughly the same speed ups (MSVC 7.1, Windows XP, Intel Core2 Duo
@ 2.13Ghz), but I see a 10% slowdown in the dict-insert/delete and
dict-set benchmarks which I find very troubling.

Test            Trunk          fastglobals    Time difference
--------------------------------------------------
Dict insert/del 2.002495495    2.207409125    1.102329134
Dict get        0.750253205    0.745576662    0.993766714
Dict set        0.982695921    1.114997766    1.13463152
Local get       0.533387029    0.51337118     0.96247406
Local set       0.596565774    0.614124914    1.029433703
Global get      0.935605073    0.731136584    0.78145855
Global set      1.48638532     1.03868462     0.69879903
Builtin get     1.392606367    0.735180673    0.52791707
Function call   1.938705781    1.716233004    0.885246756
List comp       1.547780105    1.188215756    0.767690289


PyBench shows an overall slowdown - String mappings in particular,
string/unicode predicates, and new instance creation all show
significant slowdowns. The results are fairly verbose so I've uploaded
them as a google docs spreadsheet at
http://spreadsheets.google.com/ccc?key=p7g0z40g_NpvH5UpPTpr-Ag&hl=en

I notice that you create a new PyFastGlobals object in every call to
PyEval_EvalCode. This might explain some of the general case slowdown,
is this really what you want to do?
Files
File name Uploaded
fastglobals_test.py arkanes, 2007-11-29.16:07:36
History
Date User Action Args
2007-11-29 16:07:38arkanessetspambayes_score: 0.0359898 -> 0.035989773
recipients: + arkanes, christian.heimes, ntoronto
2007-11-29 16:07:37arkanessetspambayes_score: 0.0359898 -> 0.0359898
messageid: <1196352457.71.0.275579090544.issue1518@psf.upfronthosting.co.za>
2007-11-29 16:07:37arkaneslinkissue1518 messages
2007-11-29 16:07:36arkanescreate