5 ms·
Java has both int (32 bit) and long (64 bit) types. What did you refer to as 'native'? Lucene, the popular core search library, has always used int as internal
by boomzilla 11y ago
Java has both int (32 bit) and long (64 bit) types. What did you refer to as 'native'?
Lucene, the popular core search library, has always used int as internal document IDs. As a result, the number of documents in one Lucene index is limited to 2 billions (Java int are signed). It's even worse if there are many deleted docs in the index as they are are just marked as deleted and consume up IDs. There are a number of reasons why no one is keen on moving internal docIDs to long, and performance is one of them.
- ChuckMcM 11y agoWow, and thanks for that. You are absolutely correct that Java exported all of the various integer sizes. Odd that I can clearly remember the debate and mis-remember the final outcome. Bill Joy was pretty adamant about "fixing" the various sizes of integers problem that C had been going through on x86 with the whole sizeof(int) != sizeof(ptr) code and we benchmarked it and it did not affect performance hardly at all. Wow it sucks getting old.