[issue43846] Control stack usage in large expressions

2021-04-21 Thread Mark Shannon


Mark Shannon  added the comment:

I've not measured performance, as the sort of large literals it would impact 
are very rare, and the sort of calls it would change are almost non-existent.

I'd be surprised if any performance difference could be reliably detected with 
our current performance tools.

This change is an enabler of future optimizations, such as using a contiguous 
data stack. The impact of those optimizations will swamp any impact of this 
change, and should be easily measurable.

--

___
Python tracker 

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



[issue43846] Control stack usage in large expressions

2021-04-21 Thread Mark Shannon


Change by Mark Shannon :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue43846] Control stack usage in large expressions

2021-04-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What is performance impact of this change? I expect that creating a list 
incrementally can hurt performance, but how much?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue43846] Control stack usage in large expressions

2021-04-15 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 11e0b295dee235dd6fd66a10d4823b0dcb014dc4 by Mark Shannon in 
branch 'master':
bpo-43846: Use less stack for large literals and calls (GH-25403)
https://github.com/python/cpython/commit/11e0b295dee235dd6fd66a10d4823b0dcb014dc4


--

___
Python tracker 

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



[issue43846] Control stack usage in large expressions

2021-04-14 Thread Mark Shannon


Change by Mark Shannon :


--
keywords: +patch
pull_requests: +24136
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25403

___
Python tracker 

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



[issue43846] Control stack usage in large expressions

2021-04-14 Thread Mark Shannon


Change by Mark Shannon :


--
nosy: +pablogsal

___
Python tracker 

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



[issue43846] Control stack usage in large expressions

2021-04-14 Thread Mark Shannon


New submission from Mark Shannon :

Large literals or function calls with many arguments can consume a lot of stack 
space.

This will be a problem for any future work to use a contiguous stack for data 
and possibly eliminate frame objects for most calls.

It is also possible (I haven't measured this) that this large stack consumption 
is hurting performance now, as it might leak memory by leaving giant frames in 
the free-list or as a zombie frame.

This fix relatively straightforward. For large literals and argument lists, 
build them incrementally rather than all at once.

--
assignee: Mark.Shannon
components: Interpreter Core
messages: 391072
nosy: Mark.Shannon
priority: normal
severity: normal
stage: needs patch
status: open
title: Control stack usage in large expressions
type: performance

___
Python tracker 

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