|
|
|
|
|
by mutatio
3542 days ago
|
|
A lot of the colour space calculations are orders of magnitude faster using Rust (LLVM). This would be the same story had I chose C/C++ of course, but Rust was chosen in part for educational purposes. I had originally started the re-write in Google Go, but I experimented with Rust and had a much better performance profile for the more CPU intensive stuff like using the more modern Delta E methods (https://en.m.wikipedia.org/wiki/Color_difference). I had to use the more primitive colour distance calculation methods for the node.js/JS implementation (CIE76). Not only that, I also had to cache the output after the first run. Using Rust I can use better colour difference methods, do it in real time AND get more requests/sec. I should add I still use Go on the API side of things. |
|