imp icon indicating copy to clipboard operation
imp copied to clipboard

Benchmarks showing differences btwn this and `implicitly`?

Open lloydmeta opened this issue 8 years ago • 6 comments

Hi there,

I just found out about this project and I find it very interesting; mostly because I didn't even know there was a runtime cost for using implicitly !

Do you have any benchmarks that you can share comparing imp with implicitly?

Thanks!

lloydmeta avatar Mar 29 '16 08:03 lloydmeta

Hi @lloydmeta I do have benchmarks in various places but none here.

I'll leave this issue open and try to add an unpublished subproject with some benchmarks that show the cost.

non avatar Apr 05 '16 19:04 non

https://github.com/DarkDimius/imp-bench - here are the benchmarks that suggest that there's no difference.

DarkDimius avatar Apr 17 '16 11:04 DarkDimius

@DarkDimius Thanks for posting that. I modified your benchmark in an attempt to benchmark a slightly less trivial example of typeclass usage (branch here) and got the same results:

[info] Benchmark                  Mode  Cnt  Score   Error  Units
[info] ImplVsImplicitly.baseline  avgt   30  3.268 ± 0.025  ns/op
[info] ImplVsImplicitly.explicit  avgt   30  3.292 ± 0.036  ns/op
[info] ImplVsImplicitly.imply     avgt   30  3.291 ± 0.039  ns/op

lloydmeta avatar Apr 17 '16 12:04 lloydmeta

@lloydmeta would you mind if I incorporate your change?

DarkDimius avatar Apr 17 '16 12:04 DarkDimius

could you also indicate what platform\java-vm did you run on? I'd like to include your results. Thanks

DarkDimius avatar Apr 17 '16 12:04 DarkDimius

@DarkDimius sure thing, just sent a PR.

I'm on OSX (El Capitan), Oracle Java8 JDK 1.8.0_05 (I know it's s a bit old...)

lloydmeta avatar Apr 17 '16 12:04 lloydmeta