4 ms·
A serious implementation would probably use a binary tree (such as twine [1]), so it would basically boil down to creating a node for each operation. Still expe
by vnorilo 5y ago
A serious implementation would probably use a binary tree (such as twine [1]), so it would basically boil down to creating a node for each operation. Still expensive, but if you imagine integrating it with, say, Python interpreter, I don't think it would dominate execution time. Memory might be another matter.
1: https://llvm.org/doxygen/classllvm_1_1Twine.html#details https://llvm.org/doxygen/classllvm_1_1Twine.html#details