performance - A better performing way retrieving select attributes Collections of Large Objects in Java -



performance - A better performing way retrieving select attributes Collections of Large Objects in Java -

is there method can iterate collection , only retrieve subset of attributes without loading/unloading each of total object cache? 'cos seems waste load/unload whole (possibly big) object when need attribute(s), if objects big. might cause unnecessary cache conflicts when loading such unnecessary data, right?

when meant 'load cache' mean 'process' object via processor. there objects of ex: 10 attributes. in iterating loop utilize 1 of those. in such scenario, think waste load other 9 attributes processor memory. isn't there solution extract attributes without loading total object?

also, google's guava solve problem internally?

thank you!

it's not first place look, it's not impossible you're running cache sharing problems. if you're convinced (from realistic profiling or analysis of hardware counters) bottleneck worth addressing, might consider altering info structures utilize parallel arrays of primitives (akin column-based database storage in db architectures). e.g. 1 'column' float[], short[], 3rd string[], indexed same identifier. construction allows 'query' individual columns without loading cache columns aren't needed.

i have low-level algorithmic code benefit c's struct. ran microbenchmarks on various alternatives , found parallel arrays effective alternative algorithms (that may or may not apply own).

note parallel-array construction considerably more complex maintain , mutate using objects in java.util collections. i'll reiterate - i'd take approach after you've convinced benefit worth pain.

java performance collections guava

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -