开发者

Don't recognize a profiled function when speed profiling; function is taking a lot of time

I'm writing a graphics and physics library (like half a million other programmers), in C# (like maybe five other programmers), mostly out of books at this point. However, I'm trying some speed optimizations, for which I'm doing some speed profiling.

I have a .World.CollisionLoop() function; it calls fine. However, it also calls a World.(CollisionLoop)b_0() and World.(CollisionLoop)b_1(), the last of which is taking up 50% of .World.CollisionLoop().

I'm thinking it might be the line 开发者_如何学Pythonof code where I call bodies.Sort() and sort by position.X - bounds.X (in psuedocode and with "bounds" being an AABB for bounds tests only). However, I don't know.

How do I tell what it is to optimize it? Thanks. Using EQATEC profiler.


It was the comparison functions that the .Sort() function used to sort. Anyway, solved, ignore this. :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜