Live data from Hacker News

Python is 1.3x faster by just adjusting some compiling options for libpython

bugs.python.org

11–20 of 105 posts

Re: Python is 1.3x faster by just adjusting some compiling options for libpython

#11
There’s nothing wrong with this post factually, but the tone sucks. It has an immensely combative energy for what is not really a charged subject matter.

Like sure. Today, a lot of the historical reasons for things seem silly and irrelevant. At one point, they did not seem silly and irrelevant. For compatibility with stuff sticking around from those days, we get some performance penalties that are not strictly necessary. I don’t think anyone is doing that to be an asshole, so the oddly antagonistic tone seems unjustified.

And yes, Windows with a module-level namespace is cleaner in this regard, but Windows design is entirely different and has plenty of its own skeletons. ELF does not, to me, feel significantly more horrible than PE. And I’m not speaking from inexperience; I did at least write a couple of ELF and PE parsing softwares over time, most recently go-winloader[1].

Do we need to override symbols in the same library? Probably not... kind of. Your modules may in fact not need this. However, libc probably does. Take a look at what symbols libpthread exports on your system some time.

I hate to be the person to point this out, but please consider not approaching subjects from this position. It feels alienating, and I have no idea why it’s necessary to have such a tone.

[1]: https://github.com/jchv/go-winloader

Re: Python is 1.3x faster by just adjusting some compiling options for libpython

#12
post #3

Text if you don't want to visit Facebook: Summary: Python is 1.3x faster when compiled in a way that re-examines shitty technical decisions from the 1990s. ELF is the executable and shared library format on Linux and other Unixy systems. It comes to us from 1992's Solaris 2.0, from back before even the first season of the X-Files aired. ELF files (like X-Files) are full of barely-understood horrors described only in…

Thank you. This link asked me to sign in in a very broken page (I block most of Facebook's domains), and am wondering if this is just someone who posted it on FB or if it is a post from the engineering team at FB.

Re: Python is 1.3x faster by just adjusting some compiling options for libpython

#13
post #12
post #3

Text if you don't want to visit Facebook: Summary: Python is 1.3x faster when compiled in a way that re-examines shitty technical decisions from the 1990s. ELF is the executable and shared library format on Linux and other Unixy systems. It comes to us from 1992's Solaris 2.0, from back before even the first season of the X-Files aired. ELF files (like X-Files) are full of barely-understood horrors described only in…

Thank you. This link asked me to sign in in a very broken page (I block most of Facebook's domains), and am wondering if this is just someone who posted it on FB or if it is a post from the engineering team at FB.

Just someone posting on FB

Re: Python is 1.3x faster by just adjusting some compiling options for libpython

#14
post #10
post #8

Earlier quoted context omitted.

I read it without signing in. The "Not now" link is greyed out and 4 points smaller and not a button. But it's there.

I'm seeing "You must log in to continue," with no "not now" option.

Probably expects JavaScript enabled or something. I also don't have a "not now" option. No JavaScript, no CSS.

Honestly, how can someone into tech post something like this on FB?

Re: Python is 1.3x faster by just adjusting some compiling options for libpython

#16
post #15

Doesn’t gVisor require symbol interposition to do its sandboxing thing? (At least, for binaries with static-linked runtimes, like the type Golang produces by default.)

Symbol interposition? I don't know for sure, but I would guess gVisor is using ptrace or another mechanism, to interpose on syscalls, not library calls. But these flags, I believe, only impact interposition of symbols in the same library, so even if gVisor did use interposition for something, it may not matter.

Re: Python is 1.3x faster by just adjusting some compiling options for libpython

#17
post #6

This is true for _libpython_ (the shared library version), which is the default on some distros (RedHat, Fedora, Arch), but many others (Debian, Ubuntu) use statically linked Python and never paid this performance tax.

I think using Pypy instead of CPython will give you several times the performance boost as any of this.

Pypy is not a drop-in replacement for CPython. It does not support many libraries that rely on C extensions, and targets a slightly older version of the language.

Re: Python is 1.3x faster by just adjusting some compiling options for libpython

#18
post #11

There’s nothing wrong with this post factually, but the tone sucks. It has an immensely combative energy for what is not really a charged subject matter. Like sure. Today, a lot of the historical reasons for things seem silly and irrelevant. At one point, they did not seem silly and irrelevant. For compatibility with stuff sticking around from those days, we get some performance penalties that are not strictly necess…

Not OP, but I read the "antagonistic" style of the post as just the usual catharsis humor. All in-jest. I've used that style of writing plenty before. It's a good way to blow off the steam of working with these rather absurd, archaic systems that we have to tackle on a daily basis. Programming can feel a bit kafkaesque at times, so a bit of aggressive/dark humor goes a long way.

But I do agree, it felt too thick. Still a very interesting topic regardless.

Re: Python is 1.3x faster by just adjusting some compiling options for libpython

#20
post #3

Text if you don't want to visit Facebook: Summary: Python is 1.3x faster when compiled in a way that re-examines shitty technical decisions from the 1990s. ELF is the executable and shared library format on Linux and other Unixy systems. It comes to us from 1992's Solaris 2.0, from back before even the first season of the X-Files aired. ELF files (like X-Files) are full of barely-understood horrors described only in…

Not sure this is ok copyright wise.
Post reply on HN