Skip to content

Instantly share code, notes, and snippets.

@phoddie
Last active June 23, 2018 05:19
Show Gist options
  • Save phoddie/ccdb87b992dddb39a4ec3a87e6ee9468 to your computer and use it in GitHub Desktop.
Save phoddie/ccdb87b992dddb39a4ec3a87e6ee9468 to your computer and use it in GitHub Desktop.

Output from xsuse on ESP8266.

June 22, 2018

Boolean: 0 bytes
Number: 0 bytes
String `String in ROM`: 0 bytes
String `fromCharCode(32)`: 12 chunk bytes = 12 bytes
String `String in ` + 'RAM': 24 chunk bytes = 24 bytes
Object {}: 0 bytes
Object {x: 1}: 2 slots = 32 bytes
Object {x: 1, y: 2}: 3 slots = 48 bytes
Object {x: 1, y: 2, z: 3}: 4 slots = 64 bytes
Date: 2 slots = 32 bytes
Function () => {}: 7 slots = 112 bytes
Function closure (1 variable): 10 slots = 160 bytes
Function closure (2 variables): 12 slots = 192 bytes
Function closure (3 variables): 14 slots = 224 bytes
Generator: 3 slots + 248 chunk bytes = 296 bytes
Error: 2 slots = 32 bytes
SyntaxError: 2 slots = 32 bytes
Promise: 5 slots = 80 bytes
Promise.race([a, b]): 72 slots = 1152 bytes
Promise.all([a, b]): 98 slots = 1568 bytes
Proxy: 2 slots = 32 bytes
Array []: 2 slots = 32 bytes
Array [1]: 2 slots + 24 chunk bytes = 56 bytes
Array [1, 2]: 2 slots + 40 chunk bytes = 72 bytes
Array [1, 2, 3]: 2 slots + 56 chunk bytes = 88 bytes
Array [1, 2, 3, 4, 5, 6, 7, 8, 9]: 2 slots + 152 chunk bytes = 184 bytes
Array.fill length 9: 2 slots + 152 chunk bytes = 184 bytes
ArrayBuffer - 4 byte buffer: 2 slots + 12 chunk bytes = 44 bytes
ArrayBuffer - 32 byte buffer: 2 slots + 40 chunk bytes = 72 bytes
Uint8Array (empty): 6 slots + 8 chunk bytes = 104 bytes
Uint8Array (buffer): 4 slots = 64 bytes
Uint8Array [1]: 6 slots + 12 chunk bytes = 108 bytes
Uint8Array [1, 2]: 6 slots + 12 chunk bytes = 108 bytes
Uint8Array [1, 2, 3, 4, 5, 6, 7, 8, 9]: 6 slots + 20 chunk bytes = 116 bytes
Uint16Array (empty): 6 slots + 8 chunk bytes = 104 bytes
Uint16Array (buffer): 4 slots = 64 bytes
Uint16Array [1]: 6 slots + 12 chunk bytes = 108 bytes
Uint16Array [1, 2]: 6 slots + 12 chunk bytes = 108 bytes
Uint16Array [1, 2, 3, 4, 5, 6, 7, 8, 9]: 6 slots + 28 chunk bytes = 124 bytes
Uint32Array (empty): 6 slots + 8 chunk bytes = 104 bytes
Uint32Array (buffer): 4 slots = 64 bytes
Uint32Array [1]: 6 slots + 12 chunk bytes = 108 bytes
Uint32Array [1, 2]: 6 slots + 16 chunk bytes = 112 bytes
Uint32Array [1, 2, 3, 4, 5, 6, 7, 8, 9]: 6 slots + 44 chunk bytes = 140 bytes
DataView (buffer): 3 slots = 48 bytes
Symbol ('foo'): 1 slots = 16 bytes
Symbol ('foo' + 'bar'): 1 slots + 16 chunk bytes = 32 bytes
Map (empty): 3 slots + 12 chunk bytes = 60 bytes
Map 1 entry: 6 slots + 12 chunk bytes = 108 bytes
Map 2 entries: 9 slots + 12 chunk bytes = 156 bytes
WeakMap (empty): 2 slots + 16 chunk bytes = 48 bytes
Set (empty): 3 slots + 12 chunk bytes = 60 bytes
Set 1 entry: 5 slots + 12 chunk bytes = 92 bytes
Set 2 entry: 7 slots + 12 chunk bytes = 124 bytes
WeakSet (empty): 2 slots + 16 chunk bytes = 48 bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment