imp
imp copied to clipboard
Benchmarks showing differences btwn this and `implicitly`?
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!
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.
https://github.com/DarkDimius/imp-bench - here are the benchmarks that suggest that there's no difference.
@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 would you mind if I incorporate your change?
could you also indicate what platform\java-vm did you run on? I'd like to include your results. Thanks
@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...)