HNHacker News
TopNewBestAskShowJobs

urcyanide

69 karma · joined October 2, 2021

submissionscomments
urcyanide··on Rewrite the pre-commit with features requested from the community
Rewriting it in Rust not only brings high performance, but also adopts more feature requests from the community.
urcyanide··on Lessons learned from profiling an algorithm in Rust
Thanks for pointing out. I have updated the post. I use the opposite shift since I store the binary in u64 with a different endian from the C++ version. Sorry for the confusion, my bad.
urcyanide··on Lessons learned from profiling an algorithm in Rust
Sorry for the confusing example. The bitwise one is correct since I store the binary in u64 with a different endian from the C++ version. (this happens because the C++ version is using a numpy script to do the preprocessing) My bad, I should explain it in a better way. Will update the post.
urcyanide··on Lessons learned from profiling an algorithm in Rust
Yes, i&32 is more readable.
urcyanide··on Lessons learned from profiling an algorithm in Rust
Not really, i \in (0..dim).step_by(32), shift \in {0, 32}, but for `i % 32` it's 0..32
urcyanide··on Lessons learned from profiling an algorithm in Rust
The end2end QPS is about 3x of the 1st Rust version on both SIFT & GIST datasets.
urcyanide··on Lessons learned from profiling an algorithm in Rust
I also see the profiling shows that the "iter::next" takes a large percentage in the flamegraph. Are they the same reason?
urcyanide··on Lessons learned from profiling an algorithm in Rust
Thanks for pointing out, this can be optimized by the compiler when enabling opt-level=3
urcyanide··on Lessons learned from profiling an algorithm in Rust
It has the same QPS as the C++ version for GIST dataset. While Rust has more SIMD, C++ has const generic. I guess there is still some space for future improvement.
urcyanide··on Mpire: A Python package for easier and faster multiprocessing
Some potential issues about Python multiprocessing https://blog.mapotofu.org/blogs/python-multiprocessing/. COW is quite tricky. BTW, most of the related official Python docs doesn’t mention the usage under ‘spawn’.
urcyanide··on PostgresML is 8-40x faster than Python HTTP microservices
If you are trying to compare the performance as a ML service, maybe you should try to compare it with other ML model serving frameworks like https://github.com/mosecorg/mosec or https://github.com/bentoml/BentoML. Flask/FastAPI are not built for ML services.
urcyanide··on ContainerSSH: Launch containers on demand
Recently, I found another tool built for machine learning environment: https://github.com/tensorchord/envd. It integrates with buildkit and can share the config like Python functions cross the team. This can reduce a lot complexity for data scientists.