Post AmaWBlM49leaMPiyVU by tommythorn@chaos.social
(DIR) More posts by tommythorn@chaos.social
(DIR) Post #AmaWBk1p5XroFLFIJc by regehr@mastodon.social
2024-09-30T23:20:31Z
0 likes, 0 repeats
I wasn't sure how much it would matter to vectorize scan loops such as [<] and [>>] in Brainfuck, but on my M1 Mac I'm seeing dbfi.b going about 10x faster due to just this one optimizationhttp://www.hevanet.com/cristofd/08.html
(DIR) Post #AmaWBkeSlsm8BBK9Xk by regehr@mastodon.social
2024-09-30T23:24:07Z
0 likes, 0 repeats
it was not my intent for this to become an "optimizing Brainfuck" account. this will stop soon.
(DIR) Post #AmaWBlM49leaMPiyVU by tommythorn@chaos.social
2024-09-30T23:31:42Z
0 likes, 0 repeats
@regehr Serious question: how does the effort used to get to the current performance level for BF compare to what it would have taken for something less insane, say the LCC VM (which formed the bases for the Quake III VM).
(DIR) Post #AmaWBm5nPkEWeF7Umm by regehr@mastodon.social
2024-09-30T23:38:15Z
0 likes, 0 repeats
@tommythorn ah, impossible to say without having worked on the other thing as well. what I can say about BF is that it's a bit a sweet spot for a compilers class because it has plenty of low-hanging optimizations, but they mostly require BF-specific knowledge, so for example LLVM alone would not be able to pick up most of these benefits.
(DIR) Post #AmaWBnF38pEIDESOqe by regehr@mastodon.social
2024-09-30T23:39:00Z
0 likes, 0 repeats
@tommythorn but so far in class we've only targeted native assembly. once we're done with this, we'll retarget everything to LLVM and pick up for free all of those amazing low-level optimizations that are too numerous for us to do by hand
(DIR) Post #AmaWBnymOnoEV3qv7w by resistor@mastodon.online
2024-09-30T23:42:04Z
0 likes, 0 repeats
@regehr I wrote a tracing JIT for Brainfuck using LLVM a really long time ago: https://github.com/resistor/BrainFTracing
(DIR) Post #AmaWBog1o0P6fC5SXQ by regehr@mastodon.social
2024-09-30T23:51:56Z
0 likes, 0 repeats
@resistor hoo boy. I want to say I'd use this in a performance comparison but LLVM 2.8 or whatev is pretty distant now
(DIR) Post #AmaWBpmngJPo6UGNjU by resistor@mastodon.online
2024-09-30T23:52:44Z
0 likes, 0 repeats
@regehr sounds like an extra credit opportunity for some enterprising undergrad 🤪
(DIR) Post #AmaWBqyBHU73m4az6u by regehr@mastodon.social
2024-09-30T23:55:46Z
1 likes, 0 repeats
@resistor one of the enterprising students in my class is attacking the problem that ~35% of LLVM unit tests trigger UB. 🤪 for real.
(DIR) Post #AmaWBrkOOEg4Bb9UG0 by regehr@mastodon.social
2024-10-01T00:00:40Z
0 likes, 0 repeats
@resistor @$%^ bugpoint introduced undef anytime it could, doing us dirty in the long run