# Performance

`ng-state` is highly performant library with both `immer` and `immutablejs` data strategies.

#### ng-state performance comparison

How `ng-state` acts comparing to other state management slutions:

{% embed url="<https://stackblitz.com/edit/angular-state-management-solutions-performance-comparison?embed=1&file=src/app/app.component.ts>" %}

* with `immer` ng-state is same fast or faster as `ngrx`&#x20;
* with `immutablejs` ng-state is a bit slower but immutablejs provides other benefits and acts a bit faster then immer when performing few operations.

You can read more about [immer performance here](https://hackernoon.com/introducing-immer-immutability-the-easy-way-9d73d8f71cb3).

#### Pure libraries performance comparison

* With `immer` is a bit faster than `immutablejs` when performing 10k+ operations.
* `immutablejs` a bit faster then `immer`  when performing few operations but a bit slower when performing 10k+ operations.

Pure library coparison can be found here. Change `iterations` constant to see different variations.

{% embed url="<https://stackblitz.com/edit/immer-immutable-perf-comparison?embed=1&file=index.ts>" %}
