new 4-heap code - please give it a try

Marc Lehmann schmorp at schmorp.de
Wed May 7 16:56:27 CEST 2008


I just committed code to use a 4-heap instead of a 2-heap to libev.

While a 4-heap is nominally slower, it has much better cache
characteristics, and this shows in a considerable performance improvement
with large number of timers (the libevent-like benchmark achieves 5%
higher performance, despite having a large constant factor due to the
syscalls it does).

The 4-heap is the default unless compiled with EV_MINIMAL.

I would be mainly interested in feedback of the type "it doesn't crash"
or "it seems to work correctly", but wouldn't mind performance numbers,
either :)

I'll do some further benchmarks mainly with lower number of watchers, but
so far, it seems it has no detrimental effect on the performance in that
case.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      pcg at goof.com
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list