Test name | Executions per second |
---|---|
Switch 1 case | 2768555.5 Ops/sec |
If-else 1 case | 2773617.5 Ops/sec |
Object 1 prop | 2549698.2 Ops/sec |
Switch 2 cases | 2729300.5 Ops/sec |
If-else 2 cases | 2737304.8 Ops/sec |
Object 2 props | 2550204.8 Ops/sec |
Switch 4 cases | 2781987.2 Ops/sec |
If-else 4 cases | 2695845.8 Ops/sec |
Object 4 props | 2536384.2 Ops/sec |
Switch 10 cases | 2762118.0 Ops/sec |
If-else 10 cases | 2449068.8 Ops/sec |
Object 10 props | 2475656.5 Ops/sec |
Switch 50 cases | 2752339.2 Ops/sec |
If-else 50 cases | 2107359.8 Ops/sec |
Object 50 props | 2514209.0 Ops/sec |
Switch 1k cases | 2672230.8 Ops/sec |
If-else 1k cases | 115213.6 Ops/sec |
Object 1k props | 2550471.0 Ops/sec |