ivy.nvim/lua/ivy
Ade Attwood 9f9e4a2023 perf: add lua iteration to decrease loops in lua
Move some of the iteration in to loa and access the values by the index
to reduce the number of loops we need todo to get items into teh results
buffer.

Currently the flow is:
  1) Filter and sort the candidates in rust
  2) Convert to a string and pass to lua
  3) Split the string and add them as lines in a buffer in lua

Now the flow is:
  1) Filter and sort the candidates in rust
  2) Loop over an iterator in lua
  3) Pass each item to lua as a pointer by the index

This removes quite a bit of the work that is needed to get the data into
lua as a table. We are first removing the loop that will join the
results vector into one string. Then we will remove the copy of this
string into lua. We will then finally remove the loop to split the
string and create a table from it in lua. All of this ends up in a 12%
speed up.

Output for `./scripts/bench 0.x`

Benchmark 1: HEAD
  Time (mean ± σ):      2.667 s ±  0.065 s    [User: 8.537 s, System: 1.420 s]
  Range (min … max):    2.588 s …  2.767 s    10 runs

Benchmark 2: 0.x
  Time (mean ± σ):      2.337 s ±  0.150 s    [User: 9.564 s, System: 1.648 s]
  Range (min … max):    2.161 s …  2.529 s    10 runs

Summary
  HEAD ran
    1.14 ± 0.08 times faster than 0.x

-------------------------------------
The percentage difference is -12.00%
-------------------------------------
2023-12-02 16:40:58 +00:00
..
backends feat: add ripgrep backend 2023-05-23 09:24:36 +01:00
controller.lua feat: add the paste functionality into the ivy prompt 2023-06-13 01:19:24 -07:00
controller_test.lua fix: exscpe test when passing it to vim syntax match 2022-10-06 07:57:57 +01:00
libivy.lua perf: add lua iteration to decrease loops in lua 2023-12-02 16:40:58 +00:00
libivy_test.lua perf: add lua iteration to decrease loops in lua 2023-12-02 16:40:58 +00:00
matcher_test.lua feat: move to fts fuzzy match with some modifications 2022-08-25 20:14:12 +01:00
prompt.lua feat: make delete word in promp work more like bash 2023-01-07 13:49:36 +00:00
prompt_test.lua feat: make delete word in promp work more like bash 2023-01-07 13:49:36 +00:00
utils.lua fix: opening terminal buffers 2023-04-26 07:26:12 +01:00
utils_line_action_test.lua feat: add vsplit and split actions 2022-09-07 21:19:33 +01:00
utils_vimgrep_action_test.lua feat: add vsplit and split actions 2022-09-07 21:19:33 +01:00
vim_mock.lua fix: opening terminal buffers 2023-04-26 07:26:12 +01:00
window.lua perf: add lua iteration to decrease loops in lua 2023-12-02 16:40:58 +00:00
window_test.lua perf: add lua iteration to decrease loops in lua 2023-12-02 16:40:58 +00:00