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

Zach Byrne report at bugs.python.org
Wed Feb 3 11:40:31 EST 2016


Zach Byrne added the comment:

I ran 6 benchmarks on my work machine(not the same one as the last set) overnight.
Two with just the BINARY_ADD change, two with the BINARY_SUBSCR change, and two with both.
I'm attaching the output from all my benchmark runs, but here are the highlights
In this table I've flipped the results for running the modified build as the reference, but in the new attachment, slower in the right column means faster, I think :)
|------------------|---------------------------------------|-----------------------------------|
|Build             | Baseline Reference                    | Modified Reference                |
|------------------|--------------------|------------------|--------------------|--------------|
|                  | Faster             | Slower           | Faster             | Slower       |
|------------------|--------------------|------------------|--------------------|--------------|
|BINARY_ADD        | chameleon_v2       | etree_parse      | chameleon_v2       | call_simple  |
|                  | chaos              | nbody            | fannkuch           | nbody        |
|                  | django             | normal_startup   | normal_startup     | pickle_dict  |
|                  | etree_generate     | pickle_dict      | nqueens            | regex_v8     |
|                  | fannkuch           | pickle_list      | regex_compile      |              |
|                  | formatted_logging  | regex_effbot     | spectral_norm      |              |
|                  | go                 |                  | unpickle_list      |              |
|                  | json_load          |                  |                    |              |
|                  | regex_compile      |                  |                    |              |
|                  | simple_logging     |                  |                    |              |
|                  | spectral_norm      |                  |                    |              |
|------------------|--------------------|------------------|--------------------|--------------|
|BINARY_SUBSCR     | chameleon_v2       | call_simple      | 2to3               | etree_parse  |
|                  | chaos              | go               | call_method_slots  | json_dump_v2 |
|                  | etree_generate     | pickle_list      | chaos              | pickle_dict  |
|                  | fannkuch           | telco            | fannkuch           |              |
|                  | fastpickle         |                  | formatted_logging  |              |
|                  | hexiom2            |                  | go                 |              |
|                  | json_load          |                  | hexiom2            |              |
|                  | mako_v2            |                  | mako_v2            |              |
|                  | meteor_contest     |                  | meteor_contest     |              |
|                  | nbody              |                  | nbody              |              |
|                  | regex_v8           |                  | normal_startup     |              |
|                  | spectral_norm      |                  | nqueens            |              |
|                  |                    |                  | pickle_list        |              |
|                  |                    |                  | simple_logging     |              |
|                  |                    |                  | spectral_norm      |              |
|                  |                    |                  | telco              |              |
|------------------|--------------------|------------------|--------------------|--------------|
|BOTH              | chameleon_v2       | call_simple      | chameleon_v2       | fastpickle   |
|                  | chaos              | etree_parse      | choas              | pickle_dict  |
|                  | etree_generate     | pathlib          | etree_generate     | pickle_list  |
|                  | etree_process      | pickle_list      | etree_process      | telco        |
|                  | fannkuch           |                  | fannkuch           |              |
|                  | fastunpickle       |                  | float              |              |
|                  | float              |                  | formatted_logging  |              |
|                  | formatted_logging  |                  | go                 |              |
|                  | hexiom2            |                  | hexiom2            |              |
|                  | nbody              |                  | nbody              |              |
|                  | nqueens            |                  | normal_startup     |              |
|                  | regex_v8           |                  | nqueens            |              |
|                  | spectral_norm      |                  | simple_logging     |              |
|                  | unpickle_list      |                  | spectral_norm      |              |
|------------------|--------------------|------------------|--------------------|--------------|

unpack_sequence is nowhere to be seen and spectral_norm is faster now...

----------
Added file: http://bugs.python.org/file41795/bench_results.txt

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21955>
_______________________________________


More information about the Python-bugs-list mailing list