3 ms·
Let me point out two alternatives: Cython which is very Pythonic looking, and compiles to C and produces amazing projects including UVLoop which is a drop-in mo
by giancarlostoro 10y ago
Let me point out two alternatives:
Cython which is very Pythonic looking, and compiles to C and produces amazing projects including UVLoop which is a drop-in module for asyncio for Python 3 that will speed up asyncio:
https://magic.io/blog/uvloop-blazing-fast-python-networking/ https://magic.io/blog/uvloop-blazing-fast-python-networking/
https://github.com/MagicStack/uvloop https://github.com/MagicStack/uvloop
Note how GitHub claims it's all mostly Python code ;) That's because Cython like I said looks Pythonic.
There's other examples, but I think this is one of the one's that come to mind the most to me.
There's also D which is called Native Python by some (unlike projects like Go and Rust, you can have your Object Oriented Programming (optional like in C++), and concurrency / parallelism too and other goodies like built-in unit testing, when you compile your code your unit tests are ran but not included in the final binary):
http://bitbashing.io/2015/01/26/d-is-like-native-python.html http://bitbashing.io/2015/01/26/d-is-like-native-python.html
https://blog.experimentalworks.net/2015/01/the-d-language-a-sweet-spot-between-python-and-c/ https://blog.experimentalworks.net/2015/01/the-d-language-a-...
If it's been more than a few years since you've evaluated D you might want to check it out again, it may be worth your time. D is a language I knew about for years, and recently is where I've come to appreciate it for it's many features.
D has things like array slicing, [OPTIONAL] Garbage Collection, an amazing Web Framework called Vibe.d with it's own template engine called Diet-:
http://vibed.org/ http://vibed.org/
https://vibed.org/blog/posts/introducing-diet-ng https://vibed.org/blog/posts/introducing-diet-ng
Things I like is Vibe.d is not just a Web Framework but a full networking stack too, also it supports Pug / Jade like templates (see Diet-NG) you make and compiles them when you compile your project, so your website runs off a native executable using fibers instead of threads. Vibe.d is undergoing a period where the core is being rewritten to where it is more compartmentalized so that you pick and choose which parts you need, MongoDB, PostgreSQL, layout engine and other goodies, there's even a templating library whose syntax is based around eRuby called Temple (though the syntax can be tweaked) that supports Vibe.d:
https://github.com/dymk/temple https://github.com/dymk/temple
- dagw 10y agoAnother vote for Cython. All python programmers owe it to themselves to take a look at Cython. The fact that it's compatible with (almost?) all existing python libraries and you can almost certainly run your existing python code without any changes to the source code makes it very easy to get started with. Then you can start making (often relatively minor) changes to your source code and often get 10-100x speed ups on CPU bound tasks. And the resulting libraries are all automatically importable back into normal cpython.