News for hackers. Stuff that matters.
Re:Unix "find" expressions compiled to bytecode by drob518 on Friday December 26, 2025 @04:28PM (#46396468)
I was just reading a paper about compiling SQL queries (actually about a fast compilation technique that allows for full compilation to machine code that is suitable for SQL and WASM): https://dl.acm.org/doi/pdf/10.1145/3485513

Sounds like many DBs do some level of compilation for complex queries. I suspect this is because SQL has primitives that actually compute things (e.g. aggregations, sorts, etc.). But find does basically none of that. Find is completely IO-bound.

Re:Unix "find" expressions compiled to bytecode by hxtk on Friday December 26, 2025 @06:52PM (#46397679)
Virtually all databases compile queries in one way or another, but they vary in the nature of their approaches. SQLite for example uses bytecode, while Postgres and MySQL both compile it to a computation tree which basically takes the query AST and then substitutes in different table/index operations according to the query planner.

SQLite talks about the reasons for each variation here: https://sqlite.org/whybytecode.html

Re:Unix "find" expressions compiled to bytecode by drob518 on Friday December 26, 2025 @08:52PM (#46398374)
Thanks for the reference.