The load() function for .obj files turned out to be very type-unstable (apparently the element type of eachline() can't be inferred, which meant that almost every single variable was ::Any). Fixing that and a few other minor changes makes OBJ file loading about 10X faster.
The
load()
function for.obj
files turned out to be very type-unstable (apparently the element type ofeachline()
can't be inferred, which meant that almost every single variable was::Any
). Fixing that and a few other minor changes makes OBJ file loading about 10X faster.Benchmark:
Before:
After: