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

Use ArrayList instead of LinkedList for known size [SPR-16378] #20924

spring-projects-issues opened this issue Jan 14, 2018 · 1 comment
in: data status: backported type: enhancement


Copy link

@spring-projects-issues spring-projects-issues commented Jan 14, 2018

Philippe Marschall opened SPR-16378 and commented

Spring JDBC unlike other modules uses LinkedList instead of ArrayList in several places. There is a large body of evidence suggesting that on contemporary hardware ArrayList is both faster and has less overhead than even in degenerate cases of empty lists [3] or unknown size.

There are two places in Spring JDBC where the size of the list is known in advance and an ArrayList of the correct final size can be created


Affects: 4.3.13, 5.0.2

Referenced from: pull request #1643, and commits 64af3a0, 91e39d5

Backported to: 4.3.14

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jan 14, 2018

Juergen Hoeller commented

Good point! Merged for 5.0.3 now and to be backported to 4.3.14 tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: data status: backported type: enhancement
None yet

No branches or pull requests

2 participants