On 2018-03-25, bartc <b...@freeuk.com> wrote: > On 25/03/2018 02:47, Steven D'Aprano wrote: > >> The Original Poster (OP) is concerned about saving, what, a tenth of a >> microsecond in total? Hardly seems worth the effort, especially if you're >> going to end up with something even slower. > > Using CPython on my machine, doing a string to int conversion that > specific number took 200 times as long as doing a normal assignment. > > That conversion took 4 microseconds. > > Not significant if it's only done once. But it might be executed a > million times.
Which adds up to 4 seconds. Still not worth spending hours (or even a few minutes) to optimize. -- Grant -- https://mail.python.org/mailman/listinfo/python-list