News for hackers. Stuff that matters.
Re:String.intern() by zaroth on Tuesday May 16, 2017 @01:40AM (#14347606)
The instrumentation here is impressive. The amount of data inspection done with just a few simple commands is a bit overwhelming. Frankly, I rarely hope to find myself looking at this level of metrics.

There's a lot down there I like to take for granted. But more likely I try to use methods like string.Intern() exactly never.

Use code you know and understand. Frankly, use code you can trust. And wtf would trust a method string.Inter() to do... exactly, what?

If you are writing a function to do something the name of the function must be the thing being done. What the heck is a 'static internalize'? The explicit HashMap was a few lines of code, and it's the most basic and obvious, and surprisingly performant approach. So definitely I agree you must use your own HashMap and not a static internalizer.

There are no comments on this comment yet.