DEV Community

Discussion on: Demystifying Computers: RAM (Random Access Memory)

gmelodie profile image
Gabriel Cruz (he/him) Author • Edited on

Hey there! Thank you for the comment :D

So I think python has some optimizations for that, so I've done some further testing:

Time:   0.000081778s
Time:   0.000053406s
Time:   0.000043392s
Time:   0.000041962s
Time:   0.000038385s
Time:   0.000038147s
Time:   0.000038147s
Time:   0.000037670s
Time:   0.000033379s
Time:   0.000033379s
Time:   0.000033855s
Time:   0.000033379s
Time:   0.000033617s
Time:   0.000033379s
Enter fullscreen mode Exit fullscreen mode

So as you can see the first call is about 3 times slower than the average. I'd say it's fair to assume that, even though some dark magic might be happening, it's not all that relevant to our experiment, but I'm not sure where this difference is coming from (perhaps some material for another post? 😄)