2 ms·
> link time optimizations Ah, fair enough. (Personally, I don't generally find that the performance delta between having lto on|off is worth the compile time.
by moonchild 6y ago
> link time optimizations
Ah, fair enough.
(Personally, I don't generally find that the performance delta between having lto on|off is worth the compile time. Maybe for release builds. But usually performance is jut not that much of a concern; I don't bother.)
void Move(List* units)
{
foreach(node, units, {
Unit* unit = node->data;
unit->position.x += unit->speed.x;
unit->position.y += unit->speed.y;
}
}
My approach doesn't enable anything fundamentally different from this. But it makes it more ergonomic and safer.
- glouwbug 6y agoI see your point with opaque pointers though. They are great for code obfuscation when shipping libraries, and totally do require a header / source file split making unity builds not an option. It always amazes me how C can reach the height of most modern languages with a bit of (serious) effort.