Hacker News new | past | comments | ask | show | jobs | submit login

SIMD

I wonder if Zed uses SIMD, to read in text from a file or write out text to the display.

Mitchell recently wrote about how he got a massive reduction in latency, by implementing SIMD in his terminal app (which is analogist to an editor)

https://mitchellh.com/writing/ghostty-devlog-006

https://hachyderm.io/@mitchellh/111919642467789362




memcpy, strchr, etc. use SIMD. The rust HashMap uses SIMD. LLVM can and will auto-vectorize. So yes - of course Zed - "uses SIMD", but it's not a tool you can throw at everything to make it faster.


And auto vectorization isn't all that common. In many cases you need to structure your code in a certain way, in which case you're better off doing it yourself if you want the vectorization benefit.


despite what the article claims, clang and gcc are acc very good at vectorising code, and intel, arm, etc have entire teams dedicated to improving vectorisation in modern compilers


How do you explain the before/after speed improvement then?


i'm not saying that manually writing simd assembly or intrinsics is useless, it's very often necessary, i'm just disagreeing w/ the statement

> Unfortunately, compilers are notoriously bad at autovectorization and with the exception of relatively trivial loops, compilers rarely autovectorize effectively.

from the article




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: