* Adding support for maven assembly plugin to generate executable jar with all dependencies in built * Merge branch 'master' into issue-989 # Conflicts: # abstract-document/pom.xml # pom.xml * Adding maven assemly plugin for projects with name A * Update in format as per checkstyle, i.e. Spcae in place of tab with size of 2 * batch set - 2 having all project with B and C * issue-989 d-e-f * fixing eip pom and adding g-h-i-l-m-n Skipping naked object as it seems it doesn't have main method, will consider this at end * Adding for O and P projects Skipping Object-Mother as we don't have main method for same.
layout, title, folder, permalink, categories, tags
layout | title | folder | permalink | categories | tags | ||
---|---|---|---|---|---|---|---|
pattern | Data Locality | data-locality | /patterns/data-locality/ | Behavioral |
|
Intent
Accelerate memory access by arranging data to take advantage of CPU caching.
Modern CPUs have caches to speed up memory access. These can access memory adjacent to recently accessed memory much quicker. Take advantage of that to improve performance by increasing data locality keeping data in contiguous memory in the order that you process it.
Class diagram
Applicability
- Like most optimizations, the first guideline for using the Data Locality pattern is when you have a performance problem.
- With this pattern specifically, you’ll also want to be sure your performance problems are caused by cache misses.
Real world example
- The Artemis game engine is one of the first and better-known frameworks that uses simple IDs for game entities.