Various perf. improvements
Here's a few more optimizations I made after profiling and measuring some things while running with sw rendering.
Here's a few more optimizations I made after profiling and measuring some things while running with sw rendering.