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 methane
Recipients christian.heimes, erlendaasland, gvanrossum, lemburg, methane, rhettinger, serhiy.storchaka, vstinner
Date 2021-10-07.08:31:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1633595489.76.0.671837590253.issue29410@roundup.psfhosted.org>
In-reply-to
Content
I am not sure this is worth doing.

Microbenchmarks:

## import time

```
$ main/opt/bin/pyperf command main/opt/bin/python3 -c 'import typing,asyncio'
.....................
command: Mean +- std dev: 49.6 ms +- 0.1 ms

$ siphash13/opt/bin/pyperf command siphash13/opt/bin/python3 -c 'import typing,asyncio'
.....................
command: Mean +- std dev: 49.3 ms +- 0.1 ms
```

0.6% faster.

## hash(s+'a')

```
# 6+1
$ siphash13/opt/bin/pyperf timeit --compare-to main/opt/bin/python3 --python-names siphash24:siphash13 -s 'b=b"x"*6' -- 'hash(b+b"a")'
siphash24: ..................... 87.7 ns +- 2.8 ns
siphash13: ..................... 84.8 ns +- 1.6 ns

Mean +- std dev: [siphash24] 87.7 ns +- 2.8 ns -> [siphash13] 84.8 ns +- 1.6 ns: 1.03x faster

# 6000+1
$ siphash13/opt/bin/pyperf timeit --compare-to main/opt/bin/python3 --python-names siphash24:siphash13 -s 'b=b"x"*6000' -- 'hash(b+b"a")'
siphash24: ..................... 2.98 us +- 0.03 us
siphash13: ..................... 1.67 us +- 0.03 us

Mean +- std dev: [siphash24] 2.98 us +- 0.03 us -> [siphash13] 1.67 us +- 0.03 us: 1.78x faster
```
History
Date User Action Args
2021-10-07 08:31:29methanesetrecipients: + methane, lemburg, gvanrossum, rhettinger, vstinner, christian.heimes, serhiy.storchaka, erlendaasland
2021-10-07 08:31:29methanesetmessageid: <1633595489.76.0.671837590253.issue29410@roundup.psfhosted.org>
2021-10-07 08:31:29methanelinkissue29410 messages
2021-10-07 08:31:29methanecreate