Commit be2c13e
committed
perf: streamline Tablet.from_row by inlining validation
Remove the _is_valid_tablet staticmethod indirection and replace the
two-step from_row -> _is_valid_tablet -> Tablet() chain with a single
truthiness guard and direct construction. Saves ~54 ns/call (12%)
by eliminating a staticmethod descriptor lookup, an extra function
call, and redundant 'is not None' check (replicas from CQL
deserialization is always a list or None).1 parent 3f1cda2 commit be2c13e
1 file changed
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 36 | | |
41 | 37 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
46 | 41 | | |
47 | 42 | | |
48 | 43 | | |
| |||
0 commit comments