Commit 43a743f
authored
perf(l1): avoid copy when reading account code (#5289)
**Motivation**
Currently we use `get_cf` for reading codes, which internally calls
`get_pinned_cf` and copies the result. This copying takes up 6% of code
reading time.
**Description**
Since data needs to be deserialized first, we could use a borrowed value
and avoid this copy by calling `get_pinned_cf` directly.1 parent b31c7a4 commit 43a743f
2 files changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1306 | 1306 | | |
1307 | 1307 | | |
1308 | 1308 | | |
1309 | | - | |
1310 | | - | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
1311 | 1315 | | |
1312 | 1316 | | |
1313 | | - | |
1314 | 1317 | | |
1315 | 1318 | | |
1316 | 1319 | | |
| |||
0 commit comments