HRT's Python fork: Leveraging PEP 690 for faster imports
21–30 of 103 posts
Re: HRT's Python fork: Leveraging PEP 690 for faster imports
#22Interviewed with HRT awhile back. While I didn't get past the final round, their Python internals interview (which I did pass) was an absolute blast to prepare for, and required a really deep dive into implementation specific details of CPython around things like exactly how collisions are handled in dict, details about memory management, etc. Pretty much had to spend a few weeks in the CPython source to prep, and wa…
when milliseconds mean millions
Re: HRT's Python fork: Leveraging PEP 690 for faster imports
#23Earlier quoted context omitted.
when milliseconds mean millions
If that was the case, why use Python in the first place?
Sometimes it will be worth the tradeoff to put that person and a programmer together to code up a solution in another language. Sometimes it will be worth it to have the non-programmer write it in Python and then do Herculean things in the background to make it fast enough.
Re: HRT's Python fork: Leveraging PEP 690 for faster imports
#24Earlier quoted context omitted.
If that was the case, why use Python in the first place?
Well there's gonna be people writing code who can't do it in say a high performance C/C++ setup. Not professional programmers, but professional . Sometimes it will be worth the tradeoff to put that person and a programmer together to code up a solution in another language. Sometimes it will be worth it to have the non-programmer write it in Python and then do Herculean things in the background to make it fast enough…
Nim exists, Crystal exists
Re: HRT's Python fork: Leveraging PEP 690 for faster imports
#25Earlier quoted context omitted.
Well there's gonna be people writing code who can't do it in say a high performance C/C++ setup. Not professional programmers, but professional . Sometimes it will be worth the tradeoff to put that person and a programmer together to code up a solution in another language. Sometimes it will be worth it to have the non-programmer write it in Python and then do Herculean things in the background to make it fast enough…
> Sometimes it will be worth it to have the non-programmer write it in Python and then do Herculean things in the background to make it fast enough. Nim exists, Crystal exists
But it also wouldn't surprise me if a lot of shops land on python because that's what their hiring pool knows.
Re: HRT's Python fork: Leveraging PEP 690 for faster imports
#26Interviewed with HRT awhile back. While I didn't get past the final round, their Python internals interview (which I did pass) was an absolute blast to prepare for, and required a really deep dive into implementation specific details of CPython around things like exactly how collisions are handled in dict, details about memory management, etc. Pretty much had to spend a few weeks in the CPython source to prep, and wa…
when milliseconds mean millions
Re: HRT's Python fork: Leveraging PEP 690 for faster imports
#27I really really want lazy imports in Python, it's would be a godsend for CLIs
A PEP is very much welcome, but using lazy import libraries is a fairly common, very old, method of speeding things up. My pre PEP 690 code looks like this:
import typing
from lazy import LazyImport
member = LazyImport('my_module.subpackage', 'member')
member1, member2, = LazyImport('my_module', 'member1', 'member2')
if typing.TYPE_CHECKING:
# normal import, for linter/IDE/navigation.
from my_module.subpackage import member
from my_module import member1, member2Re: HRT's Python fork: Leveraging PEP 690 for faster imports
#28Of course that doesn't solve the overhead of finding the modules, but that could be optimized without lazy import, for example by having a way to pre-compute the module locations at install time.
Re: HRT's Python fork: Leveraging PEP 690 for faster imports
#29I really really want lazy imports in Python, it's would be a godsend for CLIs
Re: HRT's Python fork: Leveraging PEP 690 for faster imports
#30Earlier quoted context omitted.
If that was the case, why use Python in the first place?
Well there's gonna be people writing code who can't do it in say a high performance C/C++ setup. Not professional programmers, but professional . Sometimes it will be worth the tradeoff to put that person and a programmer together to code up a solution in another language. Sometimes it will be worth it to have the non-programmer write it in Python and then do Herculean things in the background to make it fast enough…