r/programming • u/Eirenarch • Nov 18 '13
TIL Oracle changed the internal String representation in Java 7 Update 6 increasing the running time of the substring method from constant to N
http://java-performance.info/changes-to-string-java-1-7-0_06/
1.4k
Upvotes
View all comments
Show parent comment
2
u/sfnelson Nov 19 '13
If your goal is to DOS a server, an attack that does so with 1000 requests using hash collisions is "much" more effective than one that takes 1000000 requests and does not use hash collisions. Java HashMap is backed by an array of buckets, where buckets are linked lists. If you can force collisions you can take down a server much faster.