5 ms·
Paper here: "Codon: A Compiler for High-Performance Pythonic Applications and DSLs": https://dl.acm.org/doi/pdf/10.1145/3578360.3580275 https://dl.acm.org/doi/p
by _gtly 4y ago
Paper here: "Codon: A Compiler for High-Performance Pythonic
Applications and DSLs":
https://dl.acm.org/doi/pdf/10.1145/3578360.3580275 https://dl.acm.org/doi/pdf/10.1145/3578360.3580275
"Currently, there are several Python features that Codon
does not support. They mainly consist of runtime polymorphism, runtime reflection and type manipulation (e.g., dynamic method table modification, dynamic addition of class
members, metaclasses, and class decorators). There are also
gaps in the standard Python library coverage. While Codon
ships with Python interoperability as a workaround to some
of these limitations, future work is planned to expand the
amount of Pythonic code immediately compatible with the
framework by adding features such as runtime polymorphism and by implementing better interoperability with the
existing Python libraries. Finally, we plan to increase the
standard library coverage, as well as extend syntax configurability for custom DSLs."
- rightbyte 4y agoYe well if you remove the dynamic feutures of a dynamic language it gets fast. It would be really impressive of they can achieve those feutures with the sameish speed.
- brucethemoose2 4y agoI dont necessarily need all that dynamism though, and would happily use a Python subset that removed some stuff (and forced type hinting) in exchange for better compilation. Yes there are already subsets like this, but its not as helpful if it isnt standard.
- BiteCode_dev 4y agoDepends of the work you have to do. If you code a website, fast api and django, the two most popular framework to do so, heavily rely on them to make you productive.
- bravura 4y agoIf you code a website, your speed issues probably come from the database layer. Not your Python.
- FridgeSeal 4y agoWhat are you doing to your database? Lol Most databases I’ve dealt with will happily outstrip Python for a good chunk of the common queries.
- DougMerritt 4y agoMeasuring database speed is ultimately I/O bound, measuring a language's speed is typically CPU-bound.
- Doxin 4y agoFor sure, but django for instance is really good at turning something that ought to be one query into N+1 queries.
- fud101 4y agohow do you deal with this?
- WhatTheFlak 4y agoDon't abuse the damn ORM. And write SQL directly for medium complexity queries.
- Doxin 4y agoIn my experience? optimize things once it turns out to be a problem. It's not easy though and one of the many reasons I don't love the django ORM.
- deleted 4y ago[deleted]
- echelon 4y agoStarlark comes to mind, but that's probably too limited.
- deleted 4y ago[deleted]
- msla 4y agoI wonder what experienced Common Lisp compiler devs could accomplish if they turned their attention to Python.
- Mikhail_K 4y agohttps://julialang.org/benchmarks/ https://julialang.org/benchmarks/
- LispSporks22 4y agoThere is an implementation of Python in Common Lisp https://clpython.common-lisp.dev/ https://clpython.common-lisp.dev/ but I think you probably mean some more lower-level thing
- msla 4y agoI do: I mean some people with experience making Common Lisp implementations (SBCL, maybe) getting an idea and implementing Python with the same basic concepts they used to implement a Common Lisp compiler.
- _a_a_a_ 4y agoI'm sure this is a great project worthy of HN front page reporting but if it can't run python generally,it ain't python.
- jojohohanon 4y agoIsn’t it “self”, really? [1] Assume your python program is fully static and well behaved from a compiler perspective. JIT compile it, and observe what it does, so that you can invalidate the compiled code and re-JIT it if it does something overly dynamic. Incidentally, what JVM did. (I’m sure now it’s been tweaked beyond recognition) [1] https://bibliography.selflanguage.org/pics.html https://bibliography.selflanguage.org/pics.html