algorithm - Are there performance issues from using large numbers of objects in Java -
i working on system performance important consideration. going used processing large quantities of data (some of object types in millions) non-trivial algorithms (think integer programming problems etc.). @ moment have working solution creates these data points objects.
is there performance increase gained, treating them arrays example? there best practices working large numbers of objects in java (should avoided?).
i suggest start using commercial cpu , memory profiler. give idea of bottleneck.
reducing garbage , making memory more compact helps more when have optimised code point profilers cannot suggest anything.
you might consider structures fit in cpu caches better can improve performance 2-5x. e.g. l3 cache might 8 mb, , more 5x faster main memory. more can condense working set fit better.
btw l1 cache 32 kb , ~10x faster again.
this assumes time perform gc doesn't bother you. if create enough objects can see multi-second, multi-minute gc stop-the-world pauses.
Comments
Post a Comment