Why are there non generic versions of binary search in Java? -


why there non generic versions of binary search in java?

is because don't want crash existing implementations?

there of course generic version of binarysearch1.

the reason why there non-generic overloads performance: value types need boxed (and copied) in order able use generic binarysearch. same goes sort , other algorithms.


1 in fact there’s more 1 generic overload that’s not relevant here.


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -