So I was running q3map2 through a profiler when I noticed that a lot of time was being spent in VectorNormalize() in libs/mathlib/mathlib.c during the -light phase. I figured this was due to the math accuracy fixes, but I also figured that there weren't really necessary during lighting, so I borrowed the fast VectorNormalize2() from ioquake3 and used it in a couple of key places during lighting. I also went ahead and rewrote TraceLine_r() in light_trace.c to be iterative when possible, while I was at it.<br>
<br>These two changes improved the light time on my test map by around 7% (or one second, if you prefer), and don't seem to have any bad side effects, though I haven't tried running the regression maps on it.<br><br>
I put the patch at <a href="http://pastebin.com/uUED7Kt8">http://pastebin.com/uUED7Kt8</a> since I'm still not sure where I should be submitting patches.<br>