@tmikov
Tzvetan Mikov
3 months
I just proved that my laptop has 32TB of RAM!!! You can try this for yourself, by running the following experiment in your favorite JS engine.
Tweet media one
8
0
109

Replies

@tmikov
Tzvetan Mikov
3 months
For the record, that was a joke. JavaScript does not have arrays.
2
1
40
@akramd3v
ak ram
3 months
@tmikov Numbers objects are cached internally and reused via the same referenced objects
2
0
2
@JosuGoi1
Josu Goñi
3 months
@tmikov OS overcommit memory. And on top of that, the JS vm is probably overcomiting too.
0
0
3
@tusharsnx
Tushar Singh
3 months
@tmikov I'm more interested in `print`. What's that?
1
0
4
@batmansmk
Bat Bat
3 months
@tmikov Js Arrays are sparse and don’t allocate memory.
0
0
3
@SariBezliGurme
Arda Aydın
3 months
@tmikov For people wondering why it doesn't work: new Array creates all empty arrays, a.k.a. the array didn't actually claim any space at all. If you want to claim space, try doing mem.forEach(array=>array.fill(0))
1
0
5
@vethalik
Vethalik
3 months
@tmikov Chaotic evil
0
0
1
@tannerr_dev
tannerr
3 months
@tmikov case and point
0
0
0