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

Fix Array#update(int, T) complexity #2648

Merged
merged 1 commit into from Apr 11, 2021
Merged

Conversation

anton0xf
Copy link
Contributor

io.vavr.collection.Array#update(int, T) contains java.util.Arrays#copyOf(T[], int) call. So it can't be of constant complexity.

io.vavr.collection.Array#update(int, T) [contains](https://github.com/vavr-io/vavr/blob/2fe989583fee00842e3fc4a5f806b7f2d99a6eba/src/main/java/io/vavr/collection/Array.java#L1507) java.util.Arrays#copyOf(T[], int) call. So it can't be of constant complexity.
@codecov-io
Copy link

Codecov Report

Merging #2648 (06cb340) into master (2fe9895) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2648      +/-   ##
============================================
- Coverage     92.89%   92.87%   -0.02%     
  Complexity     5368     5368              
============================================
  Files            89       89              
  Lines         12785    12785              
  Branches       1619     1619              
============================================
- Hits          11876    11874       -2     
- Misses          720      722       +2     
  Partials        189      189              
Impacted Files Coverage Δ Complexity Δ
src/main/java/io/vavr/concurrent/FutureImpl.java 73.68% <0.00%> (-1.51%) 27.00% <0.00%> (ø%)

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 2fe9895...06cb340. Read the comment docs.

Copy link
Member

@danieldietrich danieldietrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks, this looks good.

@danieldietrich danieldietrich merged commit 502e95e into vavr-io:master Apr 11, 2021
danieldietrich pushed a commit that referenced this pull request Jul 14, 2021
io.vavr.collection.Array#update(int, T) [contains](https://github.com/vavr-io/vavr/blob/2fe989583fee00842e3fc4a5f806b7f2d99a6eba/src/main/java/io/vavr/collection/Array.java#L1507) java.util.Arrays#copyOf(T[], int) call. So it can't be of constant complexity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants