As I know, R. Hettinger is Python core developer so he knows the internal C code of each of those methods. Perhaps his tweet is based on that.
On what hardware, OS do you run this code?
Misstype on line 34: print('using concatenation --> {}'.format(timeit.timeit("using_concatination", number=repeat, setup="from __main__ import using_concatenation")))
Here is my result on Arch linux:
repeat 1000000
using concatenation --> 0.010602696005662438
using extend --> 0.010252392006805167
using chain --> 0.009878639997623395
But this was the first try. Most of the time I get something like this:
repeat 1000000
using concatenation --> 0.010324251998099498
using extend --> 0.01023155700386269
using chain --> 0.010108978000062052
On what hardware, OS do you run this code?
Misstype on line 34: print('using concatenation --> {}'.format(timeit.timeit("using_concatination", number=repeat, setup="from __main__ import using_concatenation")))
Here is my result on Arch linux:
repeat 1000000
using concatenation --> 0.010602696005662438
using extend --> 0.010252392006805167
using chain --> 0.009878639997623395
But this was the first try. Most of the time I get something like this:
repeat 1000000
using concatenation --> 0.010324251998099498
using extend --> 0.01023155700386269
using chain --> 0.010108978000062052