Message256275
Fwiw, I made a trivial benchmark in C that loads aligned and misaligned shorts ( http://paste.pound-python.org/show/HwnbCI3Pqsj8bx25Yfwp/ ). It shows that the memcpy() version takes only 65% of the time taken by the two-bytes-loaded version on a 2010 laptop. It takes 75% of the time on a modern server. On a recent little-endian PowerPC machine, 96%. On aarch64, only 45% faster (i.e. more than twice faster). This is all with gcc. It seems that using memcpy() is definitely a win nowadays. |
|
Date |
User |
Action |
Args |
2015-12-12 09:53:21 | arigo | set | recipients:
+ arigo, tim.peters, rhettinger, mark.dickinson, vstinner, skrah, serhiy.storchaka |
2015-12-12 09:53:21 | arigo | set | messageid: <1449914001.44.0.479776675963.issue25823@psf.upfronthosting.co.za> |
2015-12-12 09:53:21 | arigo | link | issue25823 messages |
2015-12-12 09:53:20 | arigo | create | |
|