Charles KWON OhJun
adede5cd69
perf: REPLACE remove Flush + bulk build + deferred write = 1600x faster
Critical fix: REPLACE was calling area.Flush() after every field write!
- gengo gen_cmd.go: removed Flush() from emitReplaceCmd
- Harbour defers write until DBCOMMIT/CLOSE/GoTo, not per-REPLACE
Combined with bulk build + deferred APPEND:
- B1 APPEND 10K: 72,228ms → 30ms (2,400x improvement!)
- B2 INDEX NAME: 34ms → 5ms (6.8x improvement)
- Harbour comparison: Five 30ms vs Harbour 27ms (1.1x)
Also: OrderCreate flushes dirty record + EOF + header before index build
Benchmark on ext4 (home dir):
┌─────────────┬──────────┬────────┬───────┐
│ Benchmark │ Harbour │ Five │ Ratio │
├─────────────┼──────────┼────────┼───────┤
│ APPEND 10K │ 27ms │ 30ms │ 1.1x │
│ INDEX NAME │ 2ms │ 5ms │ 2.5x │
│ INDEX CITY │ 0ms │ 7ms │ - │
│ SEEK 10K │ 6ms │ 25ms │ 4.2x │
│ SCAN FWD │ 1ms │ 6ms │ 6x │
│ SCAN BWD │ 0ms │ 6ms │ - │
│ PACK │ 4ms │ 3ms │ 0.75x │
└─────────────┴──────────┴────────┴───────┘
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 09:22:05 +09:00
..
2026-04-06 12:21:26 +09:00
2026-04-07 09:22:05 +09:00
2026-04-02 22:33:59 +09:00
2026-04-07 09:22:05 +09:00
2026-04-02 22:33:59 +09:00
2026-03-31 09:41:50 +09:00
2026-03-31 09:41:50 +09:00
2026-04-02 22:33:59 +09:00
2026-03-31 09:41:50 +09:00