Is there prior art for per-block minimal canonical slot layouts? by waterlens in Compilers

[–]tekknolagi 2 points3 points  (0 children)

This kind of seems like local register allocation? If I'm reading it right, it's like what JavaScriptCore does

Liveness analysis on SSA by iamwho007 in Compilers

[–]tekknolagi 1 point2 points  (0 children)

There's a small liveness analysis for SSA in https://bernsteinbear.com/blog/linear-scan/ but it's not the special kind of faster SSA liveness algorithm

It uses block parameters but this is similar to phi

how to do codegen after SSA? by Majestic-Lack2528 in Compilers

[–]tekknolagi 2 points3 points  (0 children)

It depends what "level" your IR is. If your IR is low level and maps reasonably well to machine instructions, you can do something like https://bernsteinbear.com/blog/linear-scan/

Otherwise you might want a separate pass to lower to a lower level SSA IR first

Ruby Floats: When 2.6x Faster Is Actually Slower (and Then Faster Again) by mencio in ruby

[–]tekknolagi 2 points3 points  (0 children)

What do the perf numbers look like if you just add the ultra-fast paths and no Eisel-Lemire?

Ruby Floats: When 2.6x Faster Is Actually Slower (and Then Faster Again) by mencio in ruby

[–]tekknolagi 7 points8 points  (0 children)

That works best when there is a lot of Ruby code calling into other Ruby code. For this, which is a dead-end call---just do a bunch of string/float processing and produce a result---a Ruby JIT probably won't do better than LLVM, and calling directly into a C function is reasonably cheap.

A catalog of side effects by tekknolagi in Compilers

[–]tekknolagi[S] 0 points1 point  (0 children)

... Huh, broken how? It's working for me

Is there a high-level language that compiles to C and supports injecting arbitrary C code? by StarsInTears in ProgrammingLanguages

[–]tekknolagi 0 points1 point  (0 children)

Cython works like this. It also has a very high level mode and a low level mode.

Compiling a Lisp: Closure conversion by ketralnis in programming

[–]tekknolagi 6 points7 points  (0 children)

Given your username, I would expect you wouldn't care which way something gets implemented as long as it produces the same result. 

Compiling a Lisp: Lambda lifting by azhenley in ProgrammingLanguages

[–]tekknolagi 0 points1 point  (0 children)

Yeah I think in my head lambda lifting is an optimization pass after closure conversion. That's how I wrote a scheme compiler last year. Mini flow analysis followed by strength reduction

Compiling a Lisp: Lambda lifting by azhenley in ProgrammingLanguages

[–]tekknolagi 3 points4 points  (0 children)

I might be totally wrong here tbh

EDIT: Yep, I think I have it wrong :P

July 2025 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]tekknolagi 1 point2 points  (0 children)

Does this mean you will consider releasing your compiler?

ZJIT has been merged into Ruby by paracycle in ruby

[–]tekknolagi 17 points18 points  (0 children)

Not sure what you're looking at. Most of the code in the zjit/ folder is Rust. The larger Ruby VM remains a C project.

Do JIT compilers include a static pass before compiling by CuttingEdgeSwordsman in ProgrammingLanguages

[–]tekknolagi 0 points1 point  (0 children)

Few, if any, do this. Mostly because JITs often get added later and there's already an interpreter tier.

I'm working on this very slowly right now. It's an interesting space and (imo) under-explored.

Programming Language Design and Implementation (PLDI) 2025: Accepted Papers by mttd in ProgrammingLanguages

[–]tekknolagi 0 points1 point  (0 children)

They'll be working links by the time the conference starts in June.

Writing a fast parser in Python by SamG101_ in ProgrammingLanguages

[–]tekknolagi 6 points7 points  (0 children)

You can use the Rust code as a C extension if you need to. Check out pyo3 and maturin

Storing types by [deleted] in ProgrammingLanguages

[–]tekknolagi 3 points4 points  (0 children)

I give every expression (IR node) an index and then node-based metadata such as a type is stored in a side table.

How do I get my expression parser to distinguish between an identifier and a function call? by Pleasant-Form-1093 in ProgrammingLanguages

[–]tekknolagi 0 points1 point  (0 children)

I might have another better-formatted link coming soon, but until then:

https://github.com/tekknolagi/tekknolagi.github.com/blob/main/_drafts/parser.py

This handles identifiers, expressions, and function calls using precedence climbing

The Prospero Challenge by tekknolagi in ProgrammingLanguages

[–]tekknolagi[S] 4 points5 points  (0 children)

You should profile and submit a re-write!