|
|
|
|
|
by anon-3988
361 days ago
|
|
I am not that intrigued that Python that can call some pre-compiled functions, this is already possible with any language that produces a dynamic library. The space that I am interested in is execution time compiled programs. A usecase of this is to generate a perfect hash data structure. Say you have a config file that lists out the keywords that you want to find, and then dynamically generate the perfect hash data structure compiled as if those keywords are compile time values (because they are). Or, if the number of keywords is too small, fallback to a linear search method. All done in compile time without the cost of dynamic dispatch. Of course, I am talking about numba. But I think it is cursed by the fact that the host language is Python. Imagine if Python is stronger typed, it would open up a whole new scale of optimization. |
|
Sadly the contenders on the corner get largely ignored, so we need to contend with special cased JIT DSLs, or writing native extensions, as in many cases CPython is only implementation that is available.