Skip to content

Commit 1987500

Browse files
committed
doc: improve perf tips
1 parent cedd453 commit 1987500

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,17 +305,17 @@ while ((histogram = reader.nextIntervalHistogram()) != null) {
305305
HdrHistogramJS stores values in memory buckets. Memory footprint of an histogram heavily depends on 3 things:
306306

307307
- the bucket size. A bucket can take 8, 16, 32 or 64 bits of memory. 32 bits buckets is the default.
308-
- the precision of the histogram (i.e. the number of significant value digits). You can have up to 5 value digits, 3 value digits should be enough for most use cases.
309-
- the allowed range of values. You can tunned this range with constructor/builder parameters _lowestDiscernibleValue_ and _highestTrackableValue_. If you are not sure of these values, the best option is to keep flag _autoResize_ set to true.
308+
- the precision of the histogram (i.e. the number of significant value digits). You can have up to 5 value digits, 3 value digits (default) should be enough for most use cases.
309+
- the allowed range of values. You can tunned this range with constructor/builder parameters _lowestDiscernibleValue_ and _highestTrackableValue_. If you are not sure of these values, the best option is to use flag _autoResize_, set to true by default.
310310

311-
While tunning memory footprint, 'estimatedFootprintInBytes' histogram property can get quite useful since it gives you a clear indicator of the memory cost:
311+
While tunning memory footprint, _estimatedFootprintInBytes_ histogram property can get quite useful since it gives you a clear indicator of the memory cost:
312312

313313
```
314314
const histogram = hdr.build();
315315
console.log(histogram.estimatedFootprintInBytes);
316316
```
317317

318-
If you are willing some CPU cycles in favor of memory, 'packed' bucket size is highly recommended. Available since HdrHistogramJS v1.2.0, this mode enables a very effective memory compression algorithm:
318+
If in your context saving memory is more important than saving CPU cycles, 'packed' bucket size is highly recommended. Available since HdrHistogramJS v1.2.0, this mode enables a very effective memory compression algorithm:
319319

320320
```
321321
const histogram = hdr.build({ bitBucketSize: "packed" });

0 commit comments

Comments
 (0)