See: http://blogs.testbit.eu/timj/2005/06/30/29062005/ (page moved)

Majorly improved the speed of rectangle shading in Rapicorn, here’s a quick-and-dirty random number generator which is still good enough for dithering:

	inline uint32 quick_rand32 (void)
	  static uint32 accu = 2147483563;
	  accu = 1664525 * accu + 1013904223;
	  return accu;

This has been the major speed-up-knob, other aspects were as confusing as profiling often gets, e.g. -ffast-math actually slowed down the rectangle shader by 13%.