Test name | Executions per second |
---|---|
Switch 1 case | 2451609.0 Ops/sec |
If-else 1 case | 2692039.0 Ops/sec |
Object 1 prop | 2745563.5 Ops/sec |
Switch 2 cases | 2661021.5 Ops/sec |
If-else 2 cases | 2687006.2 Ops/sec |
Object 2 props | 2722626.0 Ops/sec |
Switch 4 cases | 2597671.5 Ops/sec |
If-else 4 cases | 2469902.5 Ops/sec |
Object 4 props | 2705942.8 Ops/sec |
Switch 10 cases | 2249341.8 Ops/sec |
If-else 10 cases | 2308129.2 Ops/sec |
Object 10 props | 2730753.8 Ops/sec |
Switch 50 cases | 1580968.6 Ops/sec |
If-else 50 cases | 1625579.9 Ops/sec |
Object 50 props | 2750052.0 Ops/sec |
Switch 1k cases | 133097.3 Ops/sec |
If-else 1k cases | 143220.3 Ops/sec |
Object 1k props | 2779080.5 Ops/sec |