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

String builder pattern is irrelevant #287

Open
fracture91 opened this issue Jan 12, 2013 · 0 comments
Open

String builder pattern is irrelevant #287

fracture91 opened this issue Jan 12, 2013 · 0 comments
Labels

Comments

@fracture91
Copy link
Owner

I know there are some places in the code (usercolors) that build strings by pushing substrings into an array and then .joining the array. This "optimization" is irrelevant and was probably only ever useful for old IE versions. string.concat(blah) and the += operator are much faster.

http://jsperf.com/array-push-vs-unshift/22
https://pay.reddit.com/r/programming/comments/16e1kh/gmails_javascript_garbage_collection_hacks/c7vaa91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant