4 ms·
Do you have experience with cython? If so, how does Nim compare for writing fast C extensions?
by ngoldbaum 10y ago
Do you have experience with cython? If so, how does Nim compare for writing fast C extensions?
- lqdc13 10y agoSince you can basically write C in Cython, it depends how far you take the cython optimization. You can just add a few types, or you can go nuts via scipy's BLAS interface https://github.com/RaRe-Technologies/gensim/blob/develop/gensim/models/word2vec_inner.pyx https://github.com/RaRe-Technologies/gensim/blob/develop/gen... In general, you can get to less overhead with Cython right now because it's a much more mature project and because you can be more flexible with defining the point where you drop from python to a faster alternative. I wouldn't use that Nim/Python lib in production unless you have time to help with its development. It's good for personal projects though.
- the_mitsuhiko 10y agoMy personal experience with cython (and why I'm less than lukewarm about it) is that it's about as much fun as C to write and only really helps wih he annoyance of dealing with PyObject. That's something that was not even required for the sourcemap lib. Debugging and writing cython that is fast is feally not a very pleasant experience and the tooling is not great. Let alone that a real ecosystem exists. There is not even a good way to deal with dependencies at compile time.
- deleted 10y ago[deleted]