An inefficient design, but computer-science theory in Factorio means playing suboptimally necessarily. (Factorio wasn't designed to show off B-Trees, all the tools were designed to ya know... play Factorio) ------------ So I have to comments. #1 is about the Comp-Sci side, and #2 is about the optimization side. #3 combines both together for what I'd like to talk about. 1. Self-balancing trees (2-3 trees, Red-black Tr…
Is there a Factorio extension like "Scriptorio" that lets you put JSON on conveyor belts? With JavaScript or Lua function factories. Then you could pass the b-trees themselves around with conveyor belts and inserters, as well as the objects to insert and search. And write a recursive search function with a loop of conveyor belts running through factories, that just loops the tree around peeling off a level at a time…
If it doesn't exist you can probably wedge it in fairly easily.
I suggest that it would be worth your time to give it a poke just to see what a thoroughly excellent example of software engineering they've made there.