r/ProgrammingLanguages • • Nov 21 '17
Python 3 and Firefox 57 (an observation)
[deleted] — view deleted post
13
Upvotes
r/ProgrammingLanguages • • Nov 21 '17
[deleted] — view deleted post
View all comments
Show parent comment
4
u/oilshell Nov 22 '17 edited Nov 22 '17
Thanks! Glad it was helpful.
I definitely had that pent up and had to get it off my chest :) My pipe dream is to port all my code to "OPy", and significantly speed it up by changing the semantics slightly, and doing more compile-time optimization.
I've been loosely following the FAT optimizer work going on now in CPython, and while it's certainly impressive, the number and complexity of hoops you need to jump through to preserve Python semantics while speeding it up is a little crazy (the version number in every dictionary, etc.).
It feels like squeezing blood out of a stone.
While they were changing Python 3 semantics, why not make it a little more optimizable?
I'm shipping 158K lines of the Python VM with Oil right now. That is on a per-file granularity (each file is included or excluded verbatim). I'm probably only using 50% of each file, so it could be 80K lines of code. I think forking that amount of code is a challenge, but not out of the question! I would try to get rid of
intobject.c / longobject.c, which is still there, as well asstringobject.c / unicodeobject.c, and use the Go-style utf-8 centric scheme. That would cut it down even more.