I am wondering if there is a different approach that 'peaks' better in terms of perf, like instead of doing :
- Optimization 1: Do not allocate a Vector when tokenizing
- Optimization 2: Zero allocations — parse directly from the input bytes
- Optimization 3: Do not use Peekable
- Optimization 4: Multithreading and SIMD
- Optimization 5: Memory‑mapped I/O
Example :
- Optimization 1: Memory‑mapped I/O
- Optimization 2: Do not use Peekable
- Optimization 3: Do not allocate a Vector when tokenizing
- Optimization 4: Zero allocations — parse directly from the input bytes
Conclusion
- Optimization 5: Multithreading and SIMD
I might be guessing, but in this order probably by Optimization 3 you would reach already a high throughput that you wouldn't bother with manual simd nor Multithreading. (this is a pragmatic way, in real life you will try to minimize risk and try to reach goal as fast as possible, simd/Multithreading carry a lot of risk for your average dev team)
no, it's on purpose. if you follow what elon does, he is A/B testing and 'fixing' things when it goes viral.
He is doing the worst thing that could happen, leading us (users of x, USA, humanity) into the abyss with his obsession and sickness (yes he is sick and he should go see a therapist)