#python - Fri 20 Apr 2007 between 11:48 and 11:57

NY Lost Funds



aurynnI yelled at people about it
hgbYeah, noticed that now.
sanxiynCPython is faster on: BuiltinMethodLookup, CompareLongs, CompareStrings, CompareUnicode, ConcatStrings, ConcatUnicode, CreateInstance, CreateNewStyleInstance, DictCreation, DictWithIntegerKeys, DictWithStringKeys, ListSlicing, NormalClassAttribute, all Import tests, SmallLists, SmallTuples, SpecialClassAttribute, etc.
Wild_Cat: cProfile/lsprof is free.
(as seen by Debian)
Brend: General trend is: IronPython is faster on numbers and instances, non-raising cases, CPython on strings and classes, raising cases.
Brendsanxiyn: How much of that difference is IronPython implementation and how much is CLR?
sanxiynSlicing and importing is much faster on CPython. IronPython is nearly two times *faster* on for loops and pure function calls. That's impressive!
CPython list, tuple, dict is all more than two times faster than IronPython. Reversed for int and float.
cpinahi
i am trying to use signal.alarm(1) while python is in cursor.execute (from mysqldb)
sanxiynBrend: How can I test that?
Hm, I can just upload pybench result files somewhere.
Brendsanxiyn: I guess you can't in any sensible way, I just thought you might know :)
cpinabut it not triggering it (but same code using time.sleep is working). I think that mysqldb disables signals? how can i timeout a mysqldb execute?
sanxiynBrend: exception raising/non-raising is, IMO, definitely CLR.
Brend: CLR is optimized for cases not raising exceptions, and I think it should be.
Yhg1scpina: it's probably not so much MySQLdb as MySQL.
Brendsanxiyn: Aye, since exceptions are supposed to be ... you know, exceptional
cpinai only need to have a signal while a method takes more than X time...
sanxiynIndeed.
cpinaYhg1s: i have used this approach in perl... but I don't know in python :-)
sanxiynThe actual numbers are:
TryExcept: 6ms 103ms -94.6% 18ms 103ms -82.8%
TryRaiseExcept: 2680ms 193ms +1291.0% 2700ms 196ms +1280.0%
CSWookieBrend: Exceptions are for everybody!
sanxiyn(That's rather extreme.)
BrendYikes
sanxiynThis means, roughly, IronPython is 10x faster on TryExcept, 10x slower on TryRaiseExcept.
killfillhi
Yhg1scpina: no idea then, sorry.
sanxiynSimpleIntege SimpleIntegerArithmetic: 57ms 129ms -56.2% 57ms 130ms -56.1%
r SimpleDictManipulation: 458ms 157ms +191.4% 488ms 160ms +205.7%
SimpleDictManipulation: 458ms 157ms +191.4% 488ms 160ms +205.7%
Arithmetic: 57ms 129ms -56.2% 57ms 130ms -56.1%
Brendsanxiyn, perhaps that affects the loop tests too
sanxiynUgh.
killfillhow do i catch up if the user exeuted my python script with i.e. ./script -option1 -a comman1 -h?
i.e. with thouse command args/flags
is there any lib for this?

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 107 

IrcArchive

NY Lost Funds