Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(builtin): faster list extend for find_files #2205

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

kylo252
Copy link
Contributor

@kylo252 kylo252 commented Oct 21, 2022

Description

replace table.insert with direct indexing for performance gainz

Type of change

Performance

How Has This Been Tested?

still works :)

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code

@Conni2461
Copy link
Member

Conni2461 commented Oct 24, 2022

did you ever benchmark table.insert vs tbl[#tbl + 1] vs idx = idx + 1; tbl[idx]?

Its one of these placebo things, there is no difference within a margin of error. Try it with plenary.benchmark.

Its also startup code, its not running in a loop. But whatever

Thanks :)

@Conni2461 Conni2461 merged commit 090b687 into nvim-telescope:master Oct 24, 2022
@kylo252 kylo252 deleted the perf-tweak-tables branch October 24, 2022 07:04
Conni2461 pushed a commit that referenced this pull request Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants