romgrk / barbar.nvim

The neovim tabline plugin.
2.2k stars 81 forks source link

perf(config): minimize `tbl_deep_extend` #442

Closed Iron-E closed 1 year ago

Iron-E commented 1 year ago

This is a ~33% performance increase to config.setup.

The diff will look better after #408 merges. For now, see 2810a0a9546fefb6a78bfbdf3eb5b9b39de5ea50 for the real diff.

romgrk commented 1 year ago

33% of how much? I like performance but I also like simplicity, not sure if I like this tradeoff. In particular because it's only called once. Render code is called often, so I'm more enclined towards performance there than here.

Iron-E commented 1 year ago

0.0976ms → 0.0562ms (taken from the average of two 100,000 iteration benchmarks on my machine just now). If you don't think it's worth we can close :)

Edit: source for benchmark

romgrk commented 1 year ago

lol no that's definitely not worth. if it was in render code maybe because it's called constantly, but here no.