Memoize the last node in constvalue lists#255
Conversation
|
Tested compiling "modelsizes.inc" (#285) #include "../include/modelsizes.inc"
#pragma unused MODELS_gColRadius, MODELS_gColOffset, MODELS_gColAABB
main(){}On my machine the compile time has decreased from ~13.7 to ~0.95 seconds. |
|
Your changes will make the compiler crash if someone in the future decides to actually write something into the |
|
@maddinat0r Well yeah, now that I look at the changes I've made in this PR I think the current implementation is pretty hackish. Just adding comments won't really help, it rather needs a complete rewrite and that's exactly what I'm doing as of writing this. |
|
Ok, so this time instead of just being casted from |
The root node in
constvaluelists is always treated differently than the others, only itsnextfield is used, so it should be safe to repurpose a part of unused space to memoize the address of the last node in the list. This should speed up the addition of new nodes to the end of the list inappend_constval().