Commit d3f4bef
committed
obj_parser: add boundscheck/wraparound optimizations, remove assert
Add @cython.boundscheck(False) and @cython.wraparound(False) decorators
to both unpack_plain_row() and unpack_col_encrypted_row() in obj_parser.pyx,
matching the pattern already used in numpy_parser.pyx.
Remove the unnecessary 'assert desc.rowsize >= 0' runtime check from
unpack_col_encrypted_row() since rowsize is always non-negative by
construction from the protocol parser.1 parent 4f3c748 commit d3f4bef
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | | - | |
70 | | - | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| 105 | + | |
| 106 | + | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
| |||
0 commit comments