我什么时候需要使用 Bigarray?为什么?
Bigarray 模块的文档有些含糊。它指出该模块中数组的目的是保存“大数组”,但它并没有真正定义“大数组”的含义。什么时候应该使用 Bigarray 而不是常规数组?是否存在一定数量的元素,超过该数量我就应该使用 Bigarray?是几千个吗?百万?数十亿?
是什么让 Bigarray 能够更好地处理大数组?是什么让常规数组能够更好地处理...非大数组?
The documentation on the Bigarray module is somewhat vague. It states that the purpose of arrays in that module is to hold "large arrays", but it doesn't really define what it means by "large array". When should I use a Bigarray over a regular array? Is there a certain number of elements beyond which I should just use a Bigarray? Is it in the thousands? Millions? Billions?
And what makes a Bigarray better at dealing with big arrays? What makes a regular array better at dealing with... non-big arrays?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了答案(来自此页面)
: bigarray 库实现大型、多维、数值数组。这些数组称为“大数组”,以区别于模块数组中描述的标准 Caml 数组。 “大数组”与标准 Caml 数组的主要区别如下:
I found the answer to this (from this page):
The bigarray library implements large, multi-dimensional, numerical arrays. These arrays are called “big arrays” to distinguish them from the standard Caml arrays described in Module Array. The main differences between “big arrays” and standard Caml arrays are as follows: