PNG Benchmark

Of course it's about the compression library

I wrote a library to read images in different file formats for MS-DOS a quarter century ago, throw in a couple of years for decoration. The library got upgraded a few times along the way and had support for the PNG format using the libpng as external dependency. This is pretty standard stuff and it is a safe bet as it is the de-facto library . . .

Read More

June 08, 2020


Please optimize my code

Compilers are known to be pretty good these days and they do a terrific job. It's still a good idea to look after them for performance sensitive stuff, you know, just in case.

There is a simple piece of code that is used in quite a few places, but just recently it was in a hot path in a compressed texture decoding routine. . . .

Read More

March 27, 2019


A block compression tool


There are plenty of existing compression file formats with very nice tools and performance. You don't just go out and create a new one for no reason, right? I am a graphics programmer at heart and do all kinds of stuff where I load assets, like, a lot and want to bundle them into a resource file of some kind. In the past we . . .

Read More

December 12, 2018

JPEG Decoding Benchmark

Safe for work edition

Silvrback blog image

What's this bullshit? A picture of bananas!? They aren't even RIPE!!! You didn't sign up for this crap when you clicked on the article did you? Stay calm; everything shall be explained shortly.

Background story

We must go back in time by about 10 years to the beginning of the story. It was a fine autumn . . .

Read More

July 30, 2018

Software Rasterizer

Testing a vector math library with fun hobby project

It is a completely different to think that the code you are writing is not generating bad code and it not actually generating bad code. You want to be sure so you have to give the code real data to transform. I am not one of those people with great imaginations so I decided that I will write a software triangle rasterizer.

Having . . .

Read More

March 28, 2018

Compilers and SIMD

The love story

Compilers are pretty cool these days; they can auto-vectorize your scalar code! All you need to do is write code in such a way that the compiler can show you who's the boss.

Here's a simple example:

struct float32x16
 float v[16];

float32x16 compute(float32x16 a, float32x16 b)
  . . .

Read More

March 20, 2018

SIMD Scalar Accessor

How to make the type system work for you.

One day you find yourself writing code for a C++ vector math library. Of course, it is written with templates so that you can parametrize the scalar type and vector dimensions. You will have something like this:

template <typename ScalarType, int Size>
struct Vector
 ScalarType data[Size];

It can't . . .

Read More

March 20, 2018