Robin Becker wrote:
Whilst considering a port of old code to python 3 I see that in several
places we are using type comparisons to control processing of user
instances (as opposed to instances of built in types eg float, int, str)
I find that the obvious alternatives are not as fast as the
Steven D'Aprano st...@pearwood.info writes:
First question is, why do you care that it's slower? The difference between
the fastest and slowest functions is 1.16-0.33 = 0.83 microsecond.
That's a 71% speedup, pretty good if you ask me.
If you call the slowest function one million times, your
Paul Rubin wrote:
Steven D'Aprano st...@pearwood.info writes:
First question is, why do you care that it's slower? The difference
between the fastest and slowest functions is 1.16-0.33 = 0.83
microsecond.
That's a 71% speedup, pretty good if you ask me.
Don't you care that the code is
Steven D'Aprano wrote:
Paul Rubin wrote:
Steven D'Aprano st...@pearwood.info writes:
First question is, why do you care that it's slower? The difference
between the fastest and slowest functions is 1.16-0.33 = 0.83
microsecond.
That's a 71% speedup, pretty good if you ask me.
Don't you
Robin Becker wrote:
Steven D'Aprano wrote:
Paul Rubin wrote:
Steven D'Aprano st...@pearwood.info writes:
First question is, why do you care that it's slower? The difference
between the fastest and slowest functions is 1.16-0.33 = 0.83
microsecond.
That's a 71% speedup, pretty good if you
Whilst considering a port of old code to python 3 I see that in several
places we are using type comparisons to control processing of user
instances (as opposed to instances of built in types eg float, int, str)
I find that the obvious alternatives are not as fast as the current
code; func0