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

Add faster elementAtOrNull implementation for List #126

Merged
merged 1 commit into from Mar 22, 2021

Conversation

passsy
Copy link
Collaborator

@passsy passsy commented Mar 22, 2021

While Iterable doesn't have necessarily a length (might be infinite), a list has a fixed size and a faster lookup is possible

Fixes #124

@codecov
Copy link

codecov bot commented Mar 22, 2021

Codecov Report

Merging #126 (439f24e) into master (c935525) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
+ Coverage   96.17%   96.19%   +0.02%     
==========================================
  Files          10       10              
  Lines         653      657       +4     
==========================================
+ Hits          628      632       +4     
  Misses         25       25              
Impacted Files Coverage Δ
lib/src/list.dart 82.22% <100.00%> (+1.73%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c935525...439f24e. Read the comment docs.

@passsy passsy merged commit ebef476 into master Mar 22, 2021
@passsy passsy deleted the faster-elementAtOrNull branch March 22, 2021 00:09
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.

Linear complexity of elementAt
1 participant