Skip to content

Instantly share code, notes, and snippets.

@asvetlov
Last active June 20, 2017 11:54
Show Gist options
  • Save asvetlov/323d73ac377e714e9c5b772707bc4bad to your computer and use it in GitHub Desktop.
Save asvetlov/323d73ac377e714e9c5b772707bc4bad to your computer and use it in GitHub Desktop.
Python setitem/getitem
0.054s 0.040s 0.7x
Cython / Python / x
MD.add: 0.306s 2.065s 6.7x
CI.add str: 0.664s 2.473s 3.7x
MD.setitem str: 0.149s 6.214s 41.6x
MD.setitem istr: 0.199s 6.614s 33.3x
MD.getitem str: 0.099s 1.708s 17.3x
CI.getitem str: 0.531s 2.145s 4.0x
CI.getitem istr: 0.128s 2.010s 15.7x
istr from istr: 0.161s 0.442s 2.7x
26,48s user 0,20s system 99% cpu 26,696s total
Python setitem/getitem
0.066s 0.054s 0.8x
Cython / Python / x
MD.add: 0.333s 2.365s 7.1x
CI.add str: 0.721s 2.813s 3.9x
MD.setitem str: 0.154s 6.794s 44.2x
MD.setitem istr: 0.241s 7.176s 29.8x
MD.getitem str: 0.107s 1.791s 16.8x
CI.getitem str: 0.538s 2.219s 4.1x
CI.getitem istr: 0.143s 2.068s 14.4x
istr from istr: 0.250s 0.475s 1.9x
28,72s user 0,22s system 99% cpu 28,954s total
Python setitem/getitem
0.053s 0.043s 0.8x
Cython / Python / x
MD.add: 0.323s 0.499s 1.5x
CI.add str: 0.705s 1.558s 2.2x
MD.setitem str: 0.816s 6.404s 7.9x
MD.setitem istr: 0.955s 6.629s 6.9x
MD.getitem str: 0.295s 1.481s 5.0x
CI.getitem str: 0.727s 3.679s 5.1x
CI.getitem istr: 0.359s 3.131s 8.7x
istr from istr: 0.223s 0.454s 2.0x
28,66s user 0,28s system 99% cpu 28,953s total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment