You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2015/03/09 16:29:38 UTC
[jira] [Created] (UIMA-4279) tune space-time tradeoffs for internal
array structures in core uima
Marshall Schor created UIMA-4279:
------------------------------------
Summary: tune space-time tradeoffs for internal array structures in core uima
Key: UIMA-4279
URL: https://issues.apache.org/jira/browse/UIMA-4279
Project: UIMA
Issue Type: Improvement
Components: Core Java Framework
Affects Versions: 2.7.0SDK
Reporter: Marshall Schor
Assignee: Marshall Schor
Priority: Trivial
Fix For: 2.7.1SDK
Several internal array structures in UIMA expand like array lists by doubling, up to some size, usually 2 million entries, and then expand by adding that size (e.g., 2 million) instead of doubling.
The switch-over point for most of these is 2 million entries. Increasing this makes (for large allocations > 2 million) for more wasted space, since, on average, about 1/2 of the last reallocation may be unused On the other hand, having a large allocation size increment means that fewer reallocations are needed (each one requires copying the entries from the old into the new, usually with System.arraycopy).
Given the drop in memory cost, increase the reallocation switch-over limit for the 2 million entries to 16 million, to rebalance a bit more in favor of speed vs memory. Note this has no effect except when the size of these internal tables grows beyond 2 million entries.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)