A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-July/015930.html below:

[Python-Dev] Silly little benchmark

[Python-Dev] Silly little benchmarkGuido van Rossum guido@digicool.com
Thu, 12 Jul 2001 21:16:16 -0400
> > """It looks like the new coercion rules have optimized number ops at the
> > expense of string ops.
> 
> Is there still an intention to get rid of centralised
> coercion and move it all into the relevant methods?

This has been done (except for complex).

> If that were done, wouldn't problems like this go
> away (or at least turn into a different set of
> problems)?

I'm not sure what that remark refers to, actually.

BINARY_ADD and BINARY_SUBTRACT just test if both args are ints and
then in-line the work; BINARY_SUBSCRIPT does the same thing for
list[int].  I don't think it has anything to do with coercions.  When
the operands are strings, the costs are one pointer deref + compare to
link-time constant, and one jump (over the inlined code).

Small things add up, but I doubt that this is responsible for any
particular slow-down.

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4