Skip to content

Conversation

alexmojaki
Copy link

From the StringBuffer docs:

As of release JDK 5, this class has been supplemented with an equivalent class designed for use by a single thread, StringBuilder. The StringBuilder class should generally be used in preference to this one, as it supports all of the same operations but it is faster, as it performs no synchronization.

Unless you want to support really old versions of Java or share buffers between threads (neither of which seem to be the case here), use StringBuilder.

From the `StringBuffer` docs:

> As of release JDK 5, this class has been supplemented with an equivalent class designed for use by a single thread, StringBuilder. The StringBuilder class should generally be used in preference to this one, as it supports all of the same operations but it is faster, as it performs no synchronization.

Unless you want to support really old versions of Java or share buffers between threads (neither of which seem to be the case here), use `StringBuilder`.
@davedx
Copy link

davedx commented Mar 9, 2017

Do we really want a hash function with an explicit goal of being slow to go faster? :)

@slisznia
Copy link

slisznia commented Mar 9, 2017 via email

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.

3 participants