ivy.nvim/cpp
Ade Attwood d7df043eb9 perf: reduce copying when sorting
Passes values by reference when sorting to reduce memory copying. The
main saving on this is preventing copying of the large vector of files
getting passed into the `sort` function and then copying each item in
the vector in the for. This results in about a 27% performance gain
reducing the full benchmark of the kubernetes benchmark by 7.89 sec

Before

| Name                         | Total         | Average       | Min           | Max           |
| ---------------------------- | ------------- | ------------- | ------------- | ------------- |
| ivy_match(file.lua) 1000000x | 02.351614 (s) | 00.000002 (s) | 00.000002 (s) | 00.000042 (s) |
| ivy_files(kubernetes) 100x   | 32.704256 (s) | 00.327043 (s) | 00.289397 (s) | 00.344413 (s) |

After

| Name                         | Total         | Average       | Min           | Max           |
| ---------------------------- | ------------- | ------------- | ------------- | ------------- |
| ivy_match(file.lua) 1000000x | 02.353386 (s) | 00.000002 (s) | 00.000002 (s) | 00.000049 (s) |
| ivy_files(kubernetes) 100x   | 24.809576 (s) | 00.248096 (s) | 00.203167 (s) | 00.270263 (s) |
2022-08-07 21:48:24 +01:00
..
cli.cpp feat: add initial implementation of cpp file finder 2022-07-23 08:49:45 +01:00
file_scanner.hpp feat: add initial implementation of cpp file finder 2022-07-23 08:49:45 +01:00
fuzzy_match.cpp feat: add initial implementation of cpp file finder 2022-07-23 08:49:45 +01:00
fuzzy_match.hpp feat: add initial implementation of cpp file finder 2022-07-23 08:49:45 +01:00
lib.cpp feat: add initial implementation of cpp file finder 2022-07-23 08:49:45 +01:00
match.hpp fix: reverse the order of results 2022-07-23 09:00:51 +01:00
sorter.hpp perf: reduce copying when sorting 2022-08-07 21:48:24 +01:00
thread_pool.cpp feat: add initial implementation of cpp file finder 2022-07-23 08:49:45 +01:00
thread_pool.hpp feat: add initial implementation of cpp file finder 2022-07-23 08:49:45 +01:00