I'm trying to make a generic sorting algorithm , and i need a compare callback method, my quicksort without the call for the compare takes 3 ms with it it take 150ms is that make sense ?
my compareValue sub is as simple as it can be (compare two int) but I do cast it from object to int - maybe that add something
to see the callback overhead press quick sort and quicksortCB (you need to randomize in between)
to see the stackoverflow press same value and quicksort
the code is a mess (just testing code) sorry about that
I was trying (for fun not really need it) to generalize the sorting algorithm, basically have the developer build a list or array of objects and only he knows how to compare the values, this can not be done without call sub right ?
(until b4a will support more OOP attributes)