<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Yes, a system property might be a good compromise since it would allow the developers to customize the behavior without making it a public API. The drawback is that it can only be applied to all the instances at the same time.</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-andy</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="mail-editor-reference-message-container">
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; padding: 3pt 0in 0in; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; font-family: Aptos; font-size: 12pt; color: black;">
<b>From: </b>Jurgen Doll <jurgen@ivoryemr.co.za><br>
<b>Date: </b>Wednesday, September 3, 2025 at 05:48<br>
<b>To: </b>Andy Goryachev <andy.goryachev@oracle.com><br>
<b>Cc: </b>openjfx-discuss@openjdk.org <openjfx-discuss@openjdk.org><br>
<b>Subject: </b>Re: [External] : RichTextArea alternative FastCache suggestions<br>
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing">I was thinking about a cache size parameter setting maybe, although the current default of 512 is generous,</div>
<div class="ms-outlook-mobile-reference-message skipProofing">I was wondering about a really large screen scenario, but then wouldn't the text be larger as well ?</div>
<div class="ms-outlook-mobile-reference-message skipProofing">Maybe just have a system property in case ?</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="gmail_quote_attribution">On Sep 2 2025, at 9:16 pm, Andy Goryachev <andy.goryachev@oracle.com> wrote:</div>
<blockquote>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt;">
Dear Jurgen:</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt;">
Thank you for this suggestion! You are absolutely right noticing that the cache contains ranges as opposed to random indexes.</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif;">
<span style="font-size: 12pt;">I admit that the current implementation is less than optimal, but I wanted to avoid iterating over the whole cache. </span><span style="font-size: 16px;">There is also
</span><span style="font-size: 16px; color: rgb(0, 120, 215);"><a href="https://bugs.openjdk.org/browse/JDK-8355986" title="https://bugs.openjdk.org/browse/JDK-8355986" data-outlook-id="92b2c8df-4db9-4637-bbcc-d4852508ac2c">https://bugs.openjdk.org/browse/JDK-8355986</a></span><span style="font-size: 16px;"> which
might have been triggered by me picking a 100 as the default value for the sliding window. Personally, I haven't noticed performance issues on my mac or my windows laptop, have you?</span></div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt;">
One possibility might be an optimized hash table whose keys encode the starting index of the range. This way we could iterate over the keys, removing the whole buckets. Another alternative is a BTree+ like structure, but that gets complicated rather quickly.</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt;">
Another thing that did not make it into the incubator was configuration parameters in the constructor. I initially thought there might be a need to fine-tune various internal parameters (such as sliding window size or, in this case, the cache implementation),
but it was shot down as unwanted exposure of the implementation details.</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt;">
I am going to add your comment to the ticket, thanks!</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt;">
-andy</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: Aptos; font-size: 12pt;">
<b>From: </b>Jurgen Doll <jurgen@ivoryemr.co.za></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: Aptos; font-size: 12pt;">
<b>Date: </b>Tuesday, September 2, 2025 at 03:46</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: Aptos; font-size: 12pt;">
<b>To: </b>Andy Goryachev <andy.goryachev@oracle.com>, openjfx-discuss@openjdk.org <openjfx-discuss@openjdk.org></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: Aptos; font-size: 12pt;">
<b>Subject: </b>[External] : RichTextArea alternative FastCache suggestions</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing">Hi Andy</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing">I noticed in VFlow.onContentChange (line 1051) that the whole cellCache is cleared, instead of just the relevant cells that were changed being reset. On reviewing the FastCache implementation I can
see the difficulty in why this is the case, so after giving it some thought I have two simple variants of FastCache, that would enable resetting of cells in the cache, for you to consider using instead.</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing">First some background. The current FastCache is great for random data content, however if I'm not mistaken the RichTextArea data that it holds isn't random but rather consists of a range (window)
of consecutive cells (paragraphs) from some start index to an end index. These ranges usually move linearly forwards or backwards a single cell at a time (for scrolling), or can jump to either the immediately preceeding or proceeding range (for paging), and
sometimes jump to another range completely. It's with this type of data content and behavior that the following two variants are based on.</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing">In the first variant the HashMap is simply dropped and the cache is based solely on the Entry<T> array using the modulo of the index and cache size. This then becomes a circular or ring cache:</div>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code>public class FastCircularCache<T> {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> private static record Entry<T>(int index, T cell) { }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> private final Entry<T>[] data;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> private final int capacity;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> public FastCircularCache(int capacity) {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> data = new Entry[capacity];</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> this.capacity = capacity;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> public T get(int row) {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> Entry<T> entry = data[row % capacity];</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> if (entry != null && entry.index() == row) {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> return entry.cell();</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> return null;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> /**</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> * Adds a new cell to the cache. NOTE: this method does not check whether</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> * another cell for the given row is present, so this call must be preceded by a</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> * {@link #get(int)}.</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> */</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> public void add(int index, T cell) {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> data[index % capacity] = new Entry<>(index, cell);</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> public void reset(int start, int end) {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> for (int i = start; i < end; i++) {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> data[i % capacity] = null;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> public void clear() {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> Arrays.fill(data, null);</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code>}</code></div></pre>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing">In the second variant the array is dropped instead and the cache is based solely on the HashMap together with min and max int variables, which are the minium and maximum indices present at a particular
moment in the HashMap. These are used as eviction indices, where min is evicted from the HashMap if the new index is increasing otherwise max is evicted if the new index is decreasing. This is then a window or sliding cache:</div>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code>public class FastSlidingCache<T> {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> private int min = Integer.MAX_VALUE, max = 0;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> private final HashMap<Integer, T> data;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> private final int capacity;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> public FastSlidingCache(int capacity) {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> data = new HashMap<>(capacity);</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> this.capacity = capacity;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> public T get(int row) {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> if (row < min || row > max) return null;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> return data.get(row);</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> /**</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> * Adds a new cell to the cache. When the cache is full, this method evicts a</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> * cell from the cache first. NOTE: this method does not check whether</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> * another cell for the given row is present, so this call must be preceded by a</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> * {@link #get(int)}.</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> */</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> public void add(int index, T cell) {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> if (data.size() >= capacity) {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> if (index < min) while (!evict(max--));</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> if (index > max) while (!evict(min++));</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> if (index < min) min = index;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> if (index > max) max = index;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> data.put(index, cell);</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> private boolean evict(int index) {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> return data.remove(index) != null;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> public void reset(int start, int end) {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> for (int i = start; i < end; i++) {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> data.remove(i);</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> </code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> public void clear() {</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> min = Integer.MAX_VALUE;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> data.clear();</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> max = 0;</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code> }</code></div></pre>
<pre style="background-color: rgba(0, 0, 0, 0.05); padding: 0.2em 1em;"><div class="ms-outlook-mobile-reference-message skipProofing"><code>}</code></div></pre>
<div class="ms-outlook-mobile-reference-message skipProofing">Each variant has it's strengths and weaknesses. I hope you'll find one of them useful or at least inspiring in improving the current FastCache implementation.</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"><br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing">Kind regards</div>
<div class="ms-outlook-mobile-reference-message skipProofing">Jurgen</div>
</blockquote>
</div>
</body>
</html>