Does it makes sense to implement your own version of data structures and algorithms in your language of choice even if they are already supported, knowing that care has been taking into tuning them for best possible performance?
Does it makes sense to implement your own version of data structures and algorithms
Share
Sometimes – yes. You might need to optimise the data structure for your specific case, or give it some specific extra functionality.
A java example is apache Lucene (A mature, widely used Information Retrieval library). Although the
Map<S,T>interface and implementations already exists – for performance issues, its usage is not good enough, since it boxes theintto anInteger, and a more optimizedIntToIntMapwas developed for this purpose, instead of using aMap<Integer,Integer>.