Ichoran
Ichoran
The ThreadLocal variable has to be duplicated for every use of every thread since otherwise ThreadLocal is broken. So it adds to the per-thread overhead. The Oracle docs all caution...
`println` uses ThreadLocal? Huh. Did not know that. Regardless, maybe I should _actually_ do the microbenchmarking and then raise the concern if it's a non-negligible impact.
Well, it's _measurable_, but I guess it's not really important. It seems to be negligible on creation, just usage, and it's only if there's a _creation_ issue that it's really...
I think it's a good idea to show just how easy it can be for cases where you want "easy". There's no reason to complicate things for people who just...
(In case it's not clear, I mean: we shouldn't delete the instructions on how to install Coursier. They also need to be in an obvious place and made as clear...
Good catch! There are a lot of edge cases in this code, and apparently you found one that was missed!
Looks like (N, Long.MinValue, -1L) always returns N. Also, separately, (Long.MinValue, 0L, 1L) returns 0 instead of an exception.
The latter one is caused by ```scala // If the range crosses zero, it might overflow when subtracted val startside = num.sign(start) val endside = num.sign(end) num.toInt{ if (num.gteq(num.times(startside, endside),...
The second one is a bit more subtle. The first waypoint when traveling in the negative direction is 1, and then you go one step, and then you go to...
~~I also don't see how this line can be correct:~~ ```scala val waypointA = if (startq == zero) start else num.plus(start, num.times(startq, step)) ``` ~~I'm pretty sure this would have...