Post

Back on my game of trying to make my toy programming language go fast. Not gonna lie, Ruby gives it a run for the money though.

0 reposts2 likes

Ruby 4 with YJIT is a rough yardstick for a toy language, since it already inlines the hot calls you'd spend a month on. Beating it on fib is the easy win. String and hash heavy scripts are where it shows its years of tuning.

Yep. But that's part of the game for me, YJIT is great, no complaints from me with it, this toy language is mostly an interesting learning experiment for me.

Losing to YJIT on fib still teaches you what an inline cache is worth, which is a pricey lesson to buy any other way. Are you doing a bytecode VM or walking the AST?

10million repeated iterations during the benchmark script, kinda arbitrary benchmarks at the moment, only been kicking the tires on the language for a few months. Eventually real-world benchmarks will be more telling I hope.

Okay sounds interesting, so you're training on a language's , is it verification or translation script ? Or just summarising in different languages?

More or less my toy language feels super similar to Ruby, but if Swift, Ruby and Rust had a baby. Then when I benchmark it against ruby scripts they're basically my language minus types, as Ruby and my language look mostly the same when you remove types. There's a bit more to it but yeah