cat / 012
clone

a spreadsheet for the terminal: lotus 1-2-3 looks, google sheets keys and formulas, one go binary

Stop allocating on every cell read by SUM and friends

Dami committed 1a9be26
Argument helpers returned errors as &v of their Value parameter, which
moved the parameter to the heap on every call, not just on errors: two
allocations per cell a SUM, AVERAGE or COUNT read. errOf copies the
value only when there is an error.

  Edit/fanin-1000xSUM8192   320 ms, 16.4M allocs -> 203 ms, 2k allocs
  Edit/running-8192         2.27 s, 67M allocs   -> 1.83 s, 16k allocs
  RecalcAll/fanin           516 ms, 1.2 GB       -> 395 ms, 0.7 GB
commit
1a9be26d5cb914f9973659f415bcf8b7a79e6d2c
parent
c72b1279fc79d83a4f0bb472dc8d4726b3e5501a
author
Dami <dami.etoile@gmail.com>
4 files changed, +14 -8
Minternal/sheet/args.go8++++----
Minternal/sheet/eval.go8+++++++-
Minternal/sheet/functions.go4++--
Minternal/sheet/functions_date.go2+-
M internal/sheet/args.go +4 -4
M internal/sheet/eval.go +7 -1
M internal/sheet/functions.go +2 -2
M internal/sheet/functions_date.go +1 -1