Commit b66def5
feat(versionaware): gate prebuilt tables behind build tag, use flat globals
Move codes_gen.go behind //go:build prebuilt_tables. Without the tag,
Tables/Revisions are empty and all resolution happens via lazy JAR
extraction from the device.
Replace nested CompiledTable literals with flat global vars (one per
method slice, one per version table). The Go compiler statically
initializes flat globals in the data segment, eliminating runtime
init code entirely (9.48MB map.init → 0 init code).
Results (x86):
- Default binary (no prebuilt): 112MB, 45ms startup
- Prebuilt binary (flat globals): 123MB, 52ms startup
- Original (map init): 124MB, 80ms startup1 parent 1d12fc2 commit b66def5
3 files changed
Lines changed: 516527 additions & 434427 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments