# What is the maximum size?

**URL:** <https://es.discourse.group/t/what-is-the-maximum-size/2093>\
**Category:** I have questions\
**Created:** [July 22, 2024, 10:32am UTC](https://es.discourse.group/t/what-is-the-maximum-size/2093 "2024-07-22T10:32:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oleedd](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/oleedd/32/2148_2.png) [@oleedd](https://es.discourse.group/u/oleedd)\
**Post date:** [July 22, 2024, 10:32am UTC](https://es.discourse.group/t/what-is-the-maximum-size/2093/1 "2024-07-22T10:32:42Z")

</div>

Chrome (after waiting): Uncaught RangeError: Maximum BigInt size exceeded  
Mozilla (right away): Uncaught RangeError: BigInt is too large to allocate  
And why different errors?  
And how to execute with BigInt faster? Waiting is long in Chrome, but CPU load is only about 25%. How to use 100%?

---

<div class="post-metadata">

**Author:** ![aclaymore](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/aclaymore/32/501_2.png) [@aclaymore](https://es.discourse.group/u/aclaymore)\
**Post date:** [July 22, 2024, 12:29pm UTC](https://es.discourse.group/t/what-is-the-maximum-size/2093/2 "2024-07-22T12:29:46Z")

</div>

> [@oleedd](#):
>
> And why different errors?

The ECMAScript specification does not specify the error message. Only the error type, here `RangeError`

---

<div class="post-metadata">

**Author:** ![oleedd](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/oleedd/32/2148_2.png) [@oleedd](https://es.discourse.group/u/oleedd)\
**Post date:** [July 22, 2024, 12:53pm UTC](https://es.discourse.group/t/what-is-the-maximum-size/2093/3 "2024-07-22T12:53:44Z")

</div>

So when should this RangeError appear?  
Different behavior: Chrome gives it during execution, Firefox - before executing.

---

<div class="post-metadata">

**Author:** ![aclaymore](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/aclaymore/32/501_2.png) [@aclaymore](https://es.discourse.group/u/aclaymore)\
**Post date:** [July 22, 2024, 6:26pm UTC](https://es.discourse.group/t/what-is-the-maximum-size/2093/4 "2024-07-22T18:26:31Z")

</div>

I don't think the spec says what the minimum size that all compliant engines must support.  
I would expect all to be able to support at least 2\*\*63 because there is [BigInt64Array - JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array)

There are other areas where different implementations have different memory limits, for example the maximum number of arguments that can be passed to a function is different in different engines.

---

<div class="post-metadata">

**Author:** ![oleedd](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/oleedd/32/2148_2.png) [@oleedd](https://es.discourse.group/u/oleedd)\
**Post date:** [July 22, 2024, 6:57pm UTC](https://es.discourse.group/t/what-is-the-maximum-size/2093/5 "2024-07-22T18:57:01Z")

</div>

Some people said (stackoverflow) that it is a matter of available RAM. But it is not so in my experience. I just checked, and the maximum size in Chrome is much-much bigger than in Firefox. I thought it is the same.  
Also, interesting how to speed up JavaScript executing making it use more CPU.
