Name: Anonymous 2011-06-09 6:38
Hello /prog/riders,
I've noticed, while developing a seihou clone in C, that replacing angles (4-bytes float) with normalized vectors (2 4-bytes floats) gives a bit better performance, as I can access the sine and cosine values directly.
However, my ``bullet'' structure is already pretty big, and I wondered if the cache penalty would offset the benefits of avoiding transcental arithmetic in some conditions.
I've noticed, while developing a seihou clone in C, that replacing angles (4-bytes float) with normalized vectors (2 4-bytes floats) gives a bit better performance, as I can access the sine and cosine values directly.
However, my ``bullet'' structure is already pretty big, and I wondered if the cache penalty would offset the benefits of avoiding transcental arithmetic in some conditions.