4 ms·
Whenever I write anything non-trivial in assembly, I always go through a series of progressively lower-level implementations in C. The last ones emulate SSE ins
by jwr 13y ago
Whenever I write anything non-trivial in assembly, I always go through a series of progressively lower-level implementations in C. The last ones emulate SSE instructions with for loops and correspond very closely to the assembly code. It isn't possible for me to write a serious chunk of assembly 'just like that'.
- sillysaurus3 13y agoPlease make a video of the various stages of you doing this! Or a tutorial pointing out how the various progressions look. That's awesome, and it's extremely difficult for others to learn that process except through years of trial and error.
- nmrm 13y agoIt would be useful to watch someone (you?) step through this process.
- srean 13y agoI did not bookmark it, but there was this fun blog post about writing a number crunching HW assignment in Scheme (much against contemporary wisdom). But It ended up other implementations in C. The trick was to write it in CPS and keep hand transforming it iteratively till it was efficient assembly in a different syntax. I would still argue that that you are really writing in a high level language/abstraction and the rest is mostly tedious transliteration with special attention to keep the FPUs busy, efficient memory loading and register allocation.