gpt4 book ai didi

java - hdr 直方图足迹如何保持恒定

转载 作者:行者123 更新时间:2023-12-02 11:51:21 26 4
gpt4 key购买 nike

我无法理解 HDR Histogram 的基本概念:

The HDR Histogram maintains a fixed cost in both space and time. A Histogram's memory footprint is constant, with no allocation operations involved in recording data values or in iterating through them. The memory footprint is fixed regardless of the number of data value samples recorded, and depends solely on the dynamic range and precision chosen.

这怎么可能?或者它只是意味着它使用响应式(Reactive)队列并且不会在堆中创建新的对象实例,同时附加队列并增加总体 RAM 消耗?

最佳答案

内存占用是固定的并且在记录期间没有分配仅仅意味着所有必要的分配都发生在对象的实例化时。

假设 HDR 直方图要跟踪 10'000 个值,则在构造函数中将创建所有 10'000 个计数器。

如果您查看 Java source ,计数器是在构造函数中创建的 long 值数组。

关于java - hdr 直方图足迹如何保持恒定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47865853/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com