Commit 046c8c9
authored
Micro-optimization: replace list lookup with set membership (#1046)
In `qsimcirq/qsim_circuit.py`, changing the list `GATE_PARAMS` to a set
will result in O(1) lookups. Not likely to make a big difference for the
small set size, but perhaps it might shave some time off when many
simulations are executed.1 parent 2533066 commit 046c8c9
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments