Closed pankajgupta closed 8 years ago
What could be event better is to have our own Seq (backed by Array) that is specialized.
I benchmarked only some Map based boxing.
On Tue, 8 Sep 2015 at 07:11 Pankaj Gupta notifications@github.com wrote:
I think @szymonm https://github.com/szymonm you had pointed this out with some benchmarking data as well? If so, can you please link to a gist if possible. I am finally coming around to agreeing that this should indeed be done as the current code does un-necessary boxing/unboxing.
— Reply to this email directly or view it on GitHub https://github.com/twitter/cassovary/issues/200.
So something like class MySeq[@specialized(Int) T] { ... }
what are the reasons using this would that be better than plain Array?
If we implement get(n: Int): Int in MySeq returned int will not be boxed. And all the other methods we implement in Seq.
On Wed, 9 Sep 2015 at 06:47 Pankaj Gupta notifications@github.com wrote:
So something like class MySeq[@specialized https://github.com/specialized(Int) T] { ... }
what are the reasons using this would that be better than plain Array?
— Reply to this email directly or view it on GitHub https://github.com/twitter/cassovary/issues/200#issuecomment-138778459.
So will in an array?
That's true. But I was thinking that MySeq could have API that is a subset of scala.Seq (inluding map function for instance), so that we can eventually change it to scala.Seq, when Scala solves boxing/unboxing problems.
On Wed, 9 Sep 2015 at 09:00 Pankaj Gupta notifications@github.com wrote:
So will in an array?
— Reply to this email directly or view it on GitHub https://github.com/twitter/cassovary/issues/200#issuecomment-138807893.
Hey @szymonm -- just wondering if you are working on this?
Yes, I am. Trying to finish CMap right now and then CSeq...
On Fri, 30 Oct 2015 at 18:09 Pankaj Gupta notifications@github.com wrote:
Hey @szymonm https://github.com/szymonm -- just wondering if you are working on this?
— Reply to this email directly or view it on GitHub https://github.com/twitter/cassovary/issues/200#issuecomment-152588989.
I think @szymonm you had pointed this out with some benchmarking data as well? If so, can you please link to a gist if possible. I am finally coming around to agreeing that this should indeed be done as the current code does un-necessary boxing/unboxing.