Perlのオーバーヘッドが大きい件
$ make && perl -Iblib/lib -Iblib/arch -Ilib benchmark/all.pl Write (16 bytes): Rate Cache::FastMmap Cache::Swifty swifty_direct Cache::FastMmap 8.95/s -- -91% -93% Cache::Swifty 94.3/s 954% -- -26% swifty_direct 128/s 1329% 36% -- Read (16 bytes): Rate Cache::FastMmap Cache::Swifty swifty_direct Cache::FastMmap 37.0/s -- -88% -93% Cache::Swifty 307/s 729% -- -46% swifty_direct 568/s 1436% 85% -- Write (1024 bytes): Rate Cache::FastMmap Cache::Swifty swifty_direct Cache::FastMmap 8.92/s -- -90% -93% Cache::Swifty 90.7/s 917% -- -27% swifty_direct 124/s 1287% 36% -- Read (1024 bytes): Rate Cache::FastMmap Cache::Swifty swifty_direct Cache::FastMmap 36.3/s -- -88% -93% Cache::Swifty 294/s 710% -- -46% swifty_direct 549/s 1413% 87% --
直で swifty を呼び出すようにするとさらに速くなる件。でも C で書いた場合と比較すると、1K のリードで 1/8 程度の速度しか出ていない。つまり 7/8 が perl のオーバーヘッド? orz