[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread STINNER Victor
STINNER Victor added the comment: "In a numerics heavy application it's like that all fast paths will trigger somewhere, but those will likely be better off using numpy or numba. For a text heavy application such as a web server, only few fast paths will trigger and so the various checks only

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread STINNER Victor
STINNER Victor added the comment: > With patch: > python performance/bm_json_v2.py -n 10 --timer perf_counter Oh. There is a bit of confusion here. You must *not* run directly bm_xxx.py scripts. The calibration is done in perf.py. Try for example: python perf.py python2 python3 -b

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 04.02.2016 09:01, STINNER Victor wrote: > > "In a numerics heavy application it's like that all fast paths will trigger > somewhere, but those will likely be better off using numpy or numba. For a > text heavy application such as a web server, only few

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread STINNER Victor
STINNER Victor added the comment: +if (Py_SIZE(left) != 0) { +if (Py_SIZE(right) != 0) { + +#ifdef HAVE_LONG_LONG +mul = PyLong_FromLongLong( +(long long)SINGLE_DIGIT_LONG_AS_LONG(left) * +

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread Florin Papa
Florin Papa added the comment: I have tested the patch and it does not seem to solve the stability problem. With patch: python performance/bm_json_v2.py -n 10 --timer perf_counter 0.02829067991115153 0.027778947027400136 0.027756798081099987 0.027362094027921557 0.027256828034296632

<    1   2