54 points · by sargstuff · 3y ago · 19 comments
NumPy giving a whole other set of verbs you have to memorize to just wrap around C, then JAX+etc which take that subset and make it faster, then the pypy+pyston to rewrite big parts, with numba to do individual functions if you really want for loops. I know it's an over simplification and it's all pretty amazing work, but it's exhausting to me how many companies and people have put work into taking a fast language and trying to make subsets fast
https://sr.ht/~tpapastylianou/chain-ops-python/
It's clean, works well, it's debuggable ... having a special operator might have been nice syntactic sugar, but isnt really necessary.
Here, we present Codon, a domain-extensible compiler and DSL framework for high-performance DSLs with Python’s syntax and semantics. Codon builds on previous work on ahead-of-time type checking and compilation of Python programs and leverages a novel intermediate representation to easily incorporate domain-specific optimizations and analyses.Wasn't python back then, probably isn't now. Just something that looks similar.
Lot less haskell to switch between different levels of order logics.
Just depends on what/how using python (or any other language) for.
[0] : https://en.wikipedia.org/wiki/Unicon_(programming_language)
Python does crazy things with scoping and is too keen on implementing modules in C, but could be worse.
- pretty readable,
- not require compilation,
- have convenient data structures and a math library,
- and be performant out of the box.
Anything performant will require compilation. Interpreters are inherently slower. But some languages do the compilation implicitly for you and that's usually close enough.
No explicit compilation often means no ahead of time error reporting though which is a really useful feature for run-once programs.
> low-level languages like C or C++
I stopped reading. I'm willing to bet the "high" in "high-performance" is relative to something very low.