まだこう、細かいpros/consがわからないのでなんとも言えないんだけど、とりあえずaio_open/aio_writeと普通のopen/print/closeで同じ事した場合とでベンチマークとか取ってみた。これでいいのかなー
環境はMac OS X 10.5.8, 2.4 GHz Intel Core 2 Duo, 4GM RAM.
Comparing with buffer size 10...
Rate normal aio
normal 80.0/s -- -19%
aio 99.0/s 24% --
Comparing with buffer size 100...
Rate normal aio
normal 80.0/s -- -18%
aio 97.1/s 21% --
Comparing with buffer size 1000...
Rate normal aio
normal 76.9/s -- -13%
aio 88.5/s 15% --
Comparing with buffer size 10000...
Rate normal aio
normal 52.4/s -- -27%
aio 71.9/s 37% --
Comparing with buffer size 100000...
Rate normal aio
normal 15.9/s -- -63%
aio 42.7/s 169% --
コードはこちら、githubで。
コメント