Some speed optimizations for sparklines.