|aurynn||I yelled at people about it|
|hgb||Yeah, noticed that now.|
|sanxiyn||CPython 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.
|Brend||sanxiyn: How much of that difference is IronPython implementation and how much is CLR?|
|sanxiyn||Slicing 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.
i am trying to use signal.alarm(1) while python is in cursor.execute (from mysqldb)
|sanxiyn||Brend: How can I test that?|
Hm, I can just upload pybench result files somewhere.
|Brend||sanxiyn: I guess you can't in any sensible way, I just thought you might know :)|
|cpina||but 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?|
|sanxiyn||Brend: exception raising/non-raising is, IMO, definitely CLR.|
Brend: CLR is optimized for cases not raising exceptions, and I think it should be.
|Yhg1s||cpina: it's probably not so much MySQLdb as MySQL.|
|Brend||sanxiyn: Aye, since exceptions are supposed to be ... you know, exceptional|
|cpina||i only need to have a signal while a method takes more than X time...|
|cpina||Yhg1s: i have used this approach in perl... but I don't know in python :-)|
|sanxiyn||The actual numbers are:|
TryExcept: 6ms 103ms -94.6% 18ms 103ms -82.8%
TryRaiseExcept: 2680ms 193ms +1291.0% 2700ms 196ms +1280.0%
|CSWookie||Brend: Exceptions are for everybody!|
|sanxiyn||(That's rather extreme.)|
|sanxiyn||This means, roughly, IronPython is 10x faster on TryExcept, 10x slower on TryRaiseExcept.|
|Yhg1s||cpina: no idea then, sorry.|
|sanxiyn||SimpleIntege 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%
|Brend||sanxiyn, perhaps that affects the loop tests too|
|killfill||how 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?