4 ms·
Two problems I find: 1. You'll lose function inline optimizations, and also the branch predictor will get thrashed. 2. Local variables in that function essent
by glouwbug 7y ago
Two problems I find:
1. You'll lose function inline optimizations, and also the branch predictor will get thrashed.
2. Local variables in that function essentially become globals.
- mmis1000 7y agoI think it depends on the compiler? In the example of that article, the only place that use the data structure is the when in the function that execute the data structure. A compiler may happily just inline it because no other where use it. And you lost no performance at all. Or it may just decide to generate the result as it and you surely have performance problem now.