junit-team/junit-examples

compute method on primitive maps cause boxing/unboxing

Closed this issue · 4 comments

gity commented

The compute method on the maps require unboxing and boxing since the rely on the standard JDK 8 BiFunction instead of generating primitive type specific a BiFunction for each use case.

[...] on the maps [...]

Which maps? Use the new snippet tool! :) https://github.com/blog/2415-introducing-embedded-code-snippets

But hey, it's a sample project where speed is not the first goal. Auto-boxing is okay here.

gity commented

For example, Object2LongMap#computeLong

For example compare with Koloboke ObjLongMap#compute

It good that it is solved with Object2LongMap#computeLongIfAbsent, shame about computeLong

True.

But where are we using "standard JDK 8 BiFunction" compute methods below https://github.com/junit-team/junit5-samples ?

gity commented

sorry I posted against wrong repo