harisrinivasr / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

Using binarysearch for determining the index in the IndexedXYMap #175

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using binarysearch instead of using indexof which iterates throught the array 
improves the performance for huge amount of data seriously. If indexof have to 
load and compare 20000 values, binarysearch only needs to compare log(20000)=5 
values.
I attached a patch implementing binarysearch.

Original issue reported on code.google.com by timpam...@gmail.com on 1 Feb 2012 at 5:18

Attachments:

GoogleCodeExporter commented 9 years ago
Another cool one, thanks!
Included in SVN rev. r366.

Original comment by dandrome...@gmail.com on 10 Mar 2012 at 5:37