New submission from Alexander Riccio <test35...@gmail.com>:

This isn't a priority issue I'd say. However, fixing it could yield nice 
benefits. I ran into this while experimenting with JUMBO/Unity builds as part 
of a bit of fun I've been having tweaking build options across the CPython 
ecosystem.

Theoretically, a JUMBO/Unity build could reduce code size, improve performance, 
and maybe even help code analysis detect more bugs by building everything in a 
single compilation unit. Link Time Code Generation is great, but usually isn't 
as good as building everything in a single compilation unit.


An example of an interesting thing noticed while compiling as a Unity build:

This exact variable is defined twice in two separate source files, 
itertoolsmodule.c:4303, and and collectionsmodule.c:1774:

PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of 
len(list(it)).");

...the default Release configuration includes this exact string 12 (!) times.

There's a lot of stuff like that. It's not actually broken, and sometimes it's 
probably inconvenient to fix it (what are you gonna do? put it in a header?), 
but it would be nice.

----------
components: Interpreter Core
messages: 365636
nosy: Alexander Riccio
priority: normal
severity: normal
status: open
title: Name collisions in pythoncore, preventing unity/jumbo build
type: compile error
versions: Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40161>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to