Live data from Hacker News

QBE – Compiler Back End

c9x.me

21–30 of 38 posts

Re: QBE – Compiler Back End

#22
I don't know much about compiler development, but this seems pretty high level to me. Why would I not just compile to C and get almost all the same benefits, except it being small and hackable, but TCC is that too. And if you compile to C you can target even more architectures.

Re: QBE – Compiler Back End

#24
post #6

Did a port of busybox bzip2 compression code to plain and simple C99, and cproc/qbe gives me 70-80% of gcc (13.2.0) speed on amd zen2 (tinycc generated machine code is 2 times slower than gcc, but it is really simple and clean assembly code... so it will have its use cases...). Namely, the combo of cproc/qbe + custom assembly would be the perfect toolchain for a lean open source stack with more than decent performanc…

Wow thank you for these back of the envelope benchmarks. I wanted to "feel out" the practicality of using tinycc with cosmopolitan over the provided gcc implementation (mostly as a fun project to re-educate myself with c and assembly) but now I think I might be better off just using the provided toolset and "building something useful" (aka now I want to get lost in how the strace/xed/dynamic assembly stuff works in c…

"my current favourite discovered dark art" is an excellent way to put it and I may end up stealing it.

Re: QBE – Compiler Back End

#26
post #2

QBE is really interesting, but for people like me who still use 32 bit architectures unfortunately a bit limited. Someone recently pointed me to the Eigen compiler kit (see e.g. https://github.com/EigenCompilerSuite/ ) which - like QBE - is a lean alternative to LLVM, but supports much more architectures than QBE, even some 16 bit ones; since last week also Xtensa (ESP32) is officially supported. It's still beyond me…

Out of curiosity, why are you still using 32-bit architectures?

Re: QBE – Compiler Back End

#29
post #2

QBE is really interesting, but for people like me who still use 32 bit architectures unfortunately a bit limited. Someone recently pointed me to the Eigen compiler kit (see e.g. https://github.com/EigenCompilerSuite/ ) which - like QBE - is a lean alternative to LLVM, but supports much more architectures than QBE, even some 16 bit ones; since last week also Xtensa (ESP32) is officially supported. It's still beyond me…

Out of curiosity, why are you still using 32-bit architectures?

Dunno if this is where you're coming from, but working in 32-bit isn't that wacky. For example a very popular microcontroller [0] is 32-bit.

EDIT: definitely not "maybe the most" popular

[0]: https://en.wikipedia.org/wiki/ESP32

Post reply on HN