[issue33092] The bytecode for f-string formatting is inefficient.

2021-08-26 Thread Mark Shannon


Mark Shannon  added the comment:

No significant change in performance 
https://gist.github.com/markshannon/34a780d65e69b5a573a83f3fdb0139aa

I think this merely indicates that there are little to no f-strings in the 
pyperformance benchmark suite.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33092] The bytecode for f-string formatting is inefficient.

2018-07-25 Thread Tal Einat


Change by Tal Einat :


--
nosy:  -taleinat

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33092] The bytecode for f-string formatting is inefficient.

2018-07-25 Thread Tal Einat


Tal Einat  added the comment:

Mark, since you have a working version of this, perhaps you can supply some 
performance benchmark results to help in making a decision?

--
nosy: +taleinat

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33092] The bytecode for f-string formatting is inefficient.

2018-03-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I wouldn't say this more efficient. Instead one instruction you would need to 
execute two instructions.

If I implemented f-string formatting I would add four simple opcodes for str(), 
repr(), ascii() and format(). But Eric merged them all in the single opcode 
with complex argument. While this looks more complicated and less extensible, 
it is more efficient.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33092] The bytecode for f-string formatting is inefficient.

2018-03-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

>  I would suggest that a simper interpreter with smaller, simpler bytecodes is 
> a worthy goal in itself.

+1 from me.  Though I'm curious about performance changes as well :-)

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33092] The bytecode for f-string formatting is inefficient.

2018-03-17 Thread Mark Shannon

Mark Shannon  added the comment:

Even if doesn't speed things up by a significant amount, I would suggest that a 
simper interpreter with smaller, simpler bytecodes is a worthy goal in itself.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33092] The bytecode for f-string formatting is inefficient.

2018-03-17 Thread Mark Shannon

Change by Mark Shannon :


--
keywords: +patch
pull_requests: +5893
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33092] The bytecode for f-string formatting is inefficient.

2018-03-17 Thread Eric V. Smith

Eric V. Smith  added the comment:

Would this change really have a performance impact? Not saying it wouldn't, but 
if we're going to add bytecodes we should know the answer in advance.

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33092] The bytecode for f-string formatting is inefficient.

2018-03-17 Thread Mark Shannon

New submission from Mark Shannon :

f-string expressions can be formatted in four ways:
   with or without a conversion
   and
   with or without a format specifier

Rather than have one bytecode that parses the opcode argument at runtime it 
would be more efficient and produce a cleaner interpreter for the compiler to 
produce one or two bytecode as required.
The bytecodes should be:
  CONVERT_VALUE convert_fn
  FORMAT_SIMPLE
  FORMAT_WITH_SPEC

For simple format expressions with no conversion or format specifier,
which make up about 3/4 of all format expressions in the standard library, just 
the bytecode FORMAT_SIMPLE need be executed.

--
components: Interpreter Core
messages: 314000
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: The bytecode for f-string formatting is inefficient.
type: performance
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com