Spinel Performance — CPU vs. GPU

- 3 mins read

Vector graphics are slow

Most operating systems and applications execute their vector graphics pipelines almost exclusively on the CPU.

Graphics folklore states that vector graphics is an especially suitable task for CPUs because scanline rasterization and compositing are sequential, cache-friendly and difficult to parallelize.

As a developer of CPU rasterizers for almost a decade, I agree with this claim. Sequential scanline vector graphics rasterizers really do map well to CPUs.

Unfortunately, vector graphics performance has lagged due to displays rapidly increasing in size while CPU performance progress has slowed.

As an example, below is a video of a low-end CPU with an FHD monitor rendering a detailed SVG map of Paris using the Chrome browser’s vector graphics engine.

(video removed)

This is a substantial vector graphics file with ~50k paths. The map was obtained from here.

The CPU struggles to render the map and saturates both cores while barely breaking 1 FPS:

2D ⊄ 3D

GPU hardware has nearly doubled the performance of 3D graphics every year for the last 20 years.

The performance of CPU-powered 2D vector graphics has virtually plateaued.

One way of improving vector graphics performance is to map its primitives onto a 3D pipeline in order to take advantage of a GPU’s significant compute and memory resources.

The problem with this approach is that 2D vector graphics is not simply a subset of the 3D pipeline.

This mismatch results in a vector graphics API with poor performance and efficiency relative to the GPU’s capabilities.

Breakthrough vector graphics performance

Spinel is a new vector graphics engine that demonstrates massive speedups over existing CPU and GPU implementations while improving both render quality and power efficiency.

Spinel is a native GPU-accelerated vector graphics pipeline and not built upon a 3D pipeline.

Spinel offloads the entire vector graphics pipeline to the GPU, leaving the CPU free to perform other tasks.

Below is a video of a Spinel application running on the same configuration as above but on an entry-level $110 GPU.

(video removed)

This example map is rendered from 35-150x faster than Chrome’s optimized CPU pipeline:

(video removed)

Spinel performance scales up with GPU size.

Below is a video of the same Spinel application running on a GeForce GTX 980 GPU connected to a 4K display.

With Vsync off, the map renders at 61-225 FPS at 2x scale.

With Vsync on, the frame rate is locked at 60 FPS and the GPU is only moderately utilized:

  • GPU load: 19-75%
  • MEM load: 9-16%
  • Power: 37-52% of TDP

Future posts on performance will use a wide variety of vector graphics inputs to further demonstrate Spinel’s breakthrough performance.