Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

C compilers are just too smart IMO to make C portable assembly. Your example doesn’t always ADDI either, for example if it is inlined

https://godbolt.org/z/vv9rvKsxn

This isn’t qualitatively different from what the JVM JIT would do, but Java isn’t considered portable assembly.

I guess if you compile with optimizations completely off, you get something that is assembly-like, but I’ve never seen that in prod code.



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

Search: