Line split benchmark

13 views
Skip to first unread message

Philippe Veber

unread,
Mar 6, 2016, 12:55:25 PM3/6/16
to Biocaml
Hi everyone,

  I've just pushed a small benchmark on line splitting, comparing core, sosa and container. Results (shown below) depend on the actual compilation target (bytecode or native), but show that core's implementation performs best. sosa has some room for improvement I think [0]. Specializing core's implementation for looking for newline character yields a small something, which makes it worth being added in `Line` IMO.

I did that in preparation of moving some modules to a `base` library, that would be contain all "pure" code as we discussed last month. Let me know if you want to participate.

Cheers,
  ph.

P.S. output is generated by core_bench and provide execution time, words allocated in minor heap, in major heap, number of promotions and fraction of the slowest execution time.

[0] https://github.com/hammerlab/sosa/issues/58


BYTECODE

┌────────────────────────┬──────────┬─────────┬──────────┬──────────┬────────────┐
│ Name                   │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├────────────────────────┼──────────┼─────────┼──────────┼──────────┼────────────┤
│ container.split        │ 116.44us │ 661.00w │    0.42w │    0.42w │    100.00% │
│ sosa.split             │  68.56us │ 511.00w │    0.34w │    0.34w │     58.88% │
│ core.split             │  38.59us │ 260.00w │    0.14w │    0.14w │     33.14% │
│ specialized.core.split │  44.74us │ 253.00w │    0.14w │    0.14w │     38.42% │
└────────────────────────┴──────────┴─────────┴──────────┴──────────┴────────────┘

NATIVE

┌────────────────────────┬──────────┬─────────┬──────────┬──────────┬────────────┐
│ Name                   │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├────────────────────────┼──────────┼─────────┼──────────┼──────────┼────────────┤
│ container.split        │   6.70us │ 660.01w │    0.36w │    0.36w │    100.00% │
│ sosa.split             │   4.29us │ 511.00w │    0.28w │    0.28w │     64.11% │
│ core.split             │   4.63us │ 258.00w │    0.13w │    0.13w │     69.13% │
│ specialized.core.split │   3.39us │ 253.00w │    0.12w │    0.12w │     50.66% │
└────────────────────────┴──────────┴─────────┴──────────┴──────────┴────────────┘

Reply all
Reply to author
Forward
0 new messages