Notice
Recent Posts
Recent Comments
Link
목록성능 (1)
허허의 오늘은 뭐 먹지?
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/I5NJm/btq3098aaDK/DhwYf0K6cyFuu9GsNrIHq0/img.png)
평소에 코딩할 때 간편하다는 이유로 stream을 많이 쓰는 편인데 list와 stream하고 비교하면 어떤 것이 더 속도가 빠를지 궁금해졌다. 그래서 반복문을 사용하는 것과 stream을 이용하는 것의 비교를 해보기로 했다. public static List useFor(List integerList) { List res = new ArrayList(); for(int i : integerList) { if(i % 2 == 0 && i % 3 == 0) { res.add(i); } } return res; } public static List useStream1Filter..
SW/자세히 알아보기
2021. 5. 3. 21:26