Why is the vector class so weird?

How does the profile change with your optimization?
the b2Vec2::Set goes away:
http://usera.imagecave.com/snake5/ca_scr2.png

not a big speed improvement, but may help.
Okay, thanks for digging into this, I'll make a cleanup pass on the vector class. Another thing you can do to speed up debug builds is to allow functions to be inlined. You're mostly seeing the function call overhead because the vector functions are called a lot.

Original thread: https://box2d.org/forum/viewtopic.php?t=1917