An open API service indexing awesome lists of open source software.

https://github.com/manojadams/js-objects-memory

Memory allocated to javascript objects
https://github.com/manojadams/js-objects-memory

javascript javascript-performance memory

Last synced: 10 months ago
JSON representation

Memory allocated to javascript objects

Awesome Lists containing this project

README

          

# JavaScript Object memory test
This contain tests for memory comparison between JavaScript `class` and Javascript `function`.

## Steps
- Create 1 million object instances from `class` and `function`.
- Take a memory snapshot (Please open all three files in separate tabs/window).
- Compare memory snapshots.

## Types of test/files:
- Objects created with single class
![class-objects](https://github.com/manojadams/js-objects-memory/assets/1009561/8b89f83b-7568-4804-bd0a-1896543a09cb)

- Objects created with function
![function-objects](https://github.com/manojadams/js-objects-memory/assets/1009561/2690cd75-40da-4031-a941-6cd08856d85a)

- Objects created with multi class
![multi-class-objects](https://github.com/manojadams/js-objects-memory/assets/1009561/43abf22c-83b5-4be1-bfae-f1e0cc78e770)

## How to run
- Install serve globally

```
npm install serve --global
```

- cd into the current directory of the project.
- Run command `serve`

## Give a ⭐️ if you liked this repo!