joyent/node — pull request #7690 by kennyluck (2014-05-26 14:30:46+00:00)
Title: src: use v8::String::kInternalizedString for property names

Just in case you don't trust me on this, Chromium is doing this too (see [`v8AtomicString`](https://chromium.googlesource.com/chromium/blink/+/1cf6f54cef305d9b7ca3dffd0e85f24899553c94/Source/bindings/v8/V8Binding.h#210) and [`V8DOMConfiguration::installCallbacks`](https://chromium.googlesource.com/chromium/blink/+/1cf6f54cef305d9b7ca3dffd0e85f24899553c94/Source/bindings/v8/V8DOMConfiguration.cpp#88) for an example).

Before this patch:

```
lu-kanghao-no-macbook-pro-2:node kennyluck$ ./out/Release/node -p 'process.memoryUsage()'
{ rss: 13684736, heapTotal: 6295040, heapUsed: 2545200 }
lu-kanghao-no-macbook-pro-2:node kennyluck$ ./out/Release/node -p 'process.memoryUsage()'
{ rss: 13324288, heapTotal: 6295040, heapUsed: 2545200 }
lu-kanghao-no-macbook-pro-2:node kennyluck$ ./out/Release/node -p 'process.memoryUsage()'
{ rss: 13291520, heapTotal: 6295040, heapUsed: 2545200 }
```

After this patch:

```
lu-kanghao-no-macbook-pro-2:node kennyluck$ ./out/Release/node -p 'process.memoryUsage()'
{ rss: 13660160, heapTotal: 6295040, heapUsed: 2540208 }
lu-kanghao-no-macbook-pro-2:node kennyluck$ ./out/Release/node -p 'process.memoryUsage()'
{ rss: 13271040, heapTotal: 6295040, heapUsed: 2540208 }
lu-kanghao-no-macbook-pro-2:node kennyluck$ ./out/Release/node -p 'process.memoryUsage()'
{ rss: 13262848, heapTotal: 6295040, heapUsed: 2540208 }
```

So that's about 5k of memory reduction (yeah I know that's small, but let's do our best). Having to do character-by-character comparison during `Get()`/`Set()` seems bad, too.

This is a partial revert of @bnoordhuis f674b09. I agree that we should probably move some of these to module-scope `Persistent`s, but that'll make this patch huge. I'll just go with this one for now.

Who's the right person to review patches like this (V8 API use)? I am likely to send some more later.