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

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

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