News for hackers. Stuff that matters.
Re:Goals and Priorities for C++ by gray_-_wolf on Sunday May 24, 2020 @03:01PM (#23293755)
Could you not just produce basically two compilers, one for big and one small endian? I think that could be done with templates and such. Sure, bigger code size, but that does not seem something that would pain people from google (as I can tell looking at golang).
Re:Goals and Priorities for C++ by dodobirdlord on Sunday May 24, 2020 @06:13PM (#23295336)
Possibly, I'm no professional compiler author. But I imagine doing so would require templatizing a lot of logic, and would significantly slow down the compilation of the compiler itself, which is an important metric for development velocity of compiler improvements. (The linux kernel is famous for taking about the same amount of time to compile through its history. If compile times get long enough people start paying attention to optimizing compile time instead of performance.)

It was eye-opening when I read this blog post and learned that LLVM spends about 0.4% of all compilation time reading the bytes of the string "null-pointer-is-valid" over and over. Hot code paths can be pretty hot.

https://nikic.github.io/2020/05/10/Make-LLVM-fast-again.html