Test for lists in Cython
github.com
Test for lists in Cython
1–10 of 147 posts
Re: Test for lists in Cython
#2Re: Test for lists in Cython
#3> Rust is not that fast because it needs to copy data;
I'm surprised.
Don't know much about Rust, but isn't it hailed as being competitive with C/C++ ?
Re: Test for lists in Cython
#4From the benchmarks: > Rust is not that fast because it needs to copy data; I'm surprised. Don't know much about Rust, but isn't it hailed as being competitive with C/C++ ?
Re: Test for lists in Cython
#5From the benchmarks: > Rust is not that fast because it needs to copy data; I'm surprised. Don't know much about Rust, but isn't it hailed as being competitive with C/C++ ?
Re: Test for lists in Cython
#6Although as mentioned in the benchmark, with py2o, rust will be a superb contender, especially considering:
- the toolchain is the easiest to setup
- you can embed asm if you really need this extra juice
Re: Test for lists in Cython
#7Re: Test for lists in Cython
#8There is multiprocessing module but you cannot share memory between processes. I guess the best options are either writing a C extension or using Numba. Writing C extensions require either distributing binary packages or C compiler to be present on the target computer which is not always ideal. So is using Numba the best solution currently? I tried it a bit in the past but the errors I got was a bit hard to interpret compared to regular Python errors.
I wish the multithreading module had support for native threads. Is there any PEPs trying to bring easy multi-core support for Python?
Re: Test for lists in Cython
#9https://github.com/urschrei/simplification
https://github.com/urschrei/lonlat_bng
https://github.com/urschrei/pypolyline
Each of those repos has links to the corresponding Rust “shim” libraries that provide FFIs for dealing with the incoming data, constructing Rust data structures from it, and then transforming it back on the way out.
As a more general comment, using a GC language as the FFI target from a GC language is begging for difficult-if-not-impossible-to-debug crashes down the line.
Re: Test for lists in Cython
#10From the benchmarks: > Rust is not that fast because it needs to copy data; I'm surprised. Don't know much about Rust, but isn't it hailed as being competitive with C/C++ ?
In general, rust is at least as fast as C or C++, but this seems to be a special case.