@whispem_io Without using SIMD, you can use this impl https://t.co/V30YJ26seV and achieve a speedup of x5.4 instead of x20; this is also an SSE4.2-only impl: https://t.co/wzc4gcwukX; your version yields 0.5x compared to this code
@whispem_io The GitHub Actions environment is quite unstable; you might end up with a runner that has a different CPU, for example, and overall, it's very noisy
@lemire I'm not very familiar with the libstdc++/libc++ SSO impl, but in theory, something like https://t.co/FMdZH8wBJ4 would be the equivalent in Rust
@lemire In Rust, `String` does not have SSO, that is, every `https://t.co/l4FZyhjrzC_string()` call involves a `malloc`, and `buf[i & 1023] = ...` also involves a `free` of the previous one
2/2
@lemire In C++ `std::to_string(i)` for `i ≤ 100,000,000` returns ≤9 characters, which fits into the libstdc++/libc++ SSO buffer (15 bytes), in other words, `malloc` is not called.
1/2
@svolentin@abstract_artem з��висит от команды, может там не знаю Go, еще скорее всего перф был бы хуже, но надо смотреть на либы в Go, в среднем гошный компилятор хуже оптимизирует, чем у Rust
@Jamestjsp@vsbuffalo I actually think the opposite, it’s easier to write code with AI using the Rust ecosystem, since the compiler will always assist LLMs, sometimes immediately showing how to fix the code so that it doesn’t get passed on to runtime checks
@GiuocoPianoSimp@yawaramin@vsbuffalo That’s not entirely true either. Go is a smaller, simpler language, so its compiler can parse code faster. It also doesn’t use LLVM, so sometimes results in less optimized assembly.
For example: https://t.co/YnJ0s8Rd1j (unrolling optimization, register allocation, etc)
@yawaramin@vsbuffalo But without GC, you can write more efficient code
Similarly, Golang's "fast" compilation comes at the cost of performance, since it can generate much poorer assembly code