3 ms·
Not an expert here, but something I didn't grasp from the article was, how much of the improvement came from running multiple cores, and how much from Rust bein
by analog31 2y ago
Not an expert here, but something I didn't grasp from the article was, how much of the improvement came from running multiple cores, and how much from Rust being faster than Python? Granted, those two things may be intertwined.
- kreetx 2y agoSame question here. From one to eight threads typically doesn't account for 8x reduction directly. So if it's ten times faster, then I'd assume a single threaded Rust version made it at least twice as fast. Though I'd wager that a rewrite in Python, now starting out with full knowledge of the problem domain, would have likely also improved performance.
- UncleEntity 2y agoPython is slower than most things. I have this thing I do where I'm using a json file basically as a database. Doing it with pure python was annoyingly slow so I wrote a simple(ish) wrapper around the boost::property-tree library (which does xml and json as both are needed for the project) and have been happily chugging along for years now. I do wonder how much easier it would be to do the same thing in rust as I've found half the battle is tracking object/class lifetimes across the C-API barrier. As a side note, I'm also really good at hunting down segfaults...
- VagabundoP 2y agohttps://pypi.org/project/orjson/ https://pypi.org/project/orjson/ Try this from pypi. Its a big boost when dealing with json in python.