Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scala.Numeric should be replaced by a miniboxed typeclass #154

Open
VladUreche opened this issue Dec 1, 2014 · 1 comment
Open

scala.Numeric should be replaced by a miniboxed typeclass #154

VladUreche opened this issue Dec 1, 2014 · 1 comment

Comments

@VladUreche
Copy link
Member

And the miniboxing plugin should warn programmers against using scala.Numeric and using miniboxing.Numeric instead.

@VladUreche VladUreche self-assigned this Dec 1, 2014
@VladUreche VladUreche added this to the 0.5 milestone Dec 1, 2014
VladUreche added a commit to VladUreche/scala-streams that referenced this issue Dec 1, 2014
The only significant change is the addition of the Numeric trait
that is required for obtaining the best performance (it cuts down
the benchmark time by 50-100%). The rest is just the same source
code, modulo some whitespace my editor f'd up.

The Numeric issue is tracked here:
miniboxing/miniboxing-plugin#154

And the numbers I got were:
```
[info] Benchmark                                        Mode  Samples    Score     Error  Units
[info] b.StreamsBenchmarks.baseline_cart                avgt        5    5.931 ±   3.828  ms/op
[info] b.StreamsBenchmarks.baseline_ref                 avgt        5   39.861 ±   8.073  ms/op
[info] b.StreamsBenchmarks.baseline_sum                 avgt        5    7.577 ±   3.460  ms/op
[info] b.StreamsBenchmarks.baseline_sumOfSquares        avgt        5    8.385 ±   2.146  ms/op
[info] b.StreamsBenchmarks.baseline_sumOfSquaresEven    avgt        5   16.549 ±   6.565  ms/op
[info] b.StreamsBenchmarks.streams_cart                 avgt        5   64.212 ±  15.141  ms/op
[info] b.StreamsBenchmarks.streams_ref                  avgt        5   64.660 ±   2.339  ms/op
[info] b.StreamsBenchmarks.streams_sum                  avgt        5   12.628 ±   2.238  ms/op
[info] b.StreamsBenchmarks.streams_sumOfSquares         avgt        5   13.332 ±   0.478  ms/op
[info] b.StreamsBenchmarks.streams_sumOfSquaresEven     avgt        5   48.973 ±   2.852  ms/op
[info] b.StreamsBenchmarks.views_cart                   avgt        5  256.326 ±  48.221  ms/op
[info] b.StreamsBenchmarks.views_ref                    avgt        5  160.198 ±  15.765  ms/op
[info] b.StreamsBenchmarks.views_sum                    avgt        5   83.606 ±  13.433  ms/op
[info] b.StreamsBenchmarks.views_sumOfSquares           avgt        5  188.036 ±  10.412  ms/op
[info] b.StreamsBenchmarks.views_sumOfSquaresEven       avgt        5  236.694 ± 101.736  ms/op
```
VladUreche added a commit to VladUreche/scala-streams that referenced this issue Dec 1, 2014
The only significant change is the addition of the Numeric trait
that is required for obtaining the best performance (it cuts down
the benchmark time by 50-100%). The rest is just the same source
code, modulo some whitespace my editor f'd up.

The Numeric issue is tracked here:
miniboxing/miniboxing-plugin#154

And the numbers I got were:
```

[info] Benchmark                                        Mode  Samples    Score    Error  Units
[info] b.StreamsBenchmarks.baseline_cart                avgt        5    5.202 ±  0.544  ms/op
[info] b.StreamsBenchmarks.baseline_ref                 avgt        5   29.927 ±  6.279  ms/op
[info] b.StreamsBenchmarks.baseline_sum                 avgt        5    6.628 ±  2.986  ms/op
[info] b.StreamsBenchmarks.baseline_sumOfSquares        avgt        5    7.164 ±  1.254  ms/op
[info] b.StreamsBenchmarks.baseline_sumOfSquaresEven    avgt        5   12.746 ±  1.243  ms/op
[info] b.StreamsBenchmarks.streams_cart                 avgt        5   55.321 ± 12.771  ms/op
[info] b.StreamsBenchmarks.streams_ref                  avgt        5   63.508 ± 12.324  ms/op
[info] b.StreamsBenchmarks.streams_sum                  avgt        5   12.017 ±  0.879  ms/op
[info] b.StreamsBenchmarks.streams_sumOfSquares         avgt        5   12.977 ±  0.670  ms/op
[info] b.StreamsBenchmarks.streams_sumOfSquaresEven     avgt        5   52.159 ± 32.626  ms/op
[info] b.StreamsBenchmarks.views_cart                   avgt        5  314.893 ± 64.045  ms/op
[info] b.StreamsBenchmarks.views_ref                    avgt        5  157.288 ± 15.642  ms/op
[info] b.StreamsBenchmarks.views_sum                    avgt        5   83.296 ± 19.200  ms/op
[info] b.StreamsBenchmarks.views_sumOfSquares           avgt        5  200.816 ± 75.311  ms/op
[info] b.StreamsBenchmarks.views_sumOfSquaresEven       avgt        5  221.260 ± 13.161  ms/op
```
@VladUreche
Copy link
Member Author

This is done, long ago, just needs a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant