Hacker News new | past | comments | ask | show | jobs | submit login

There's no particular limit to JVM, you can use all available memory if you like.

For best performance you can decompose your structure to primitive fields (int, float, char, etc) and create array for every field. So you have, say, 10 arrays with million items each. Instead of creating one array which holds pointers to another 10 million objects on the heap. It gets tricky with strings (you need to flatten all strings into a giant char[] array and keep two arrays with index and length data, but doable.

Though 10 million of records might be OK for JVM. Measure your GC times.

I'd suggest to hide implementation details behind API, start with ArrayList<MyRecord> and refactor it later if needed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: