Grokking V8 closures for fun (and profit?) ã«ãã»ãã®å°ãã ã触ãããã¦ãã話ãªãã§ããã ããæè¿ã¾ã§ V8 ã«ã¯ããªãã¸ã§ã¯ããªãã©ã«ã®ä¸ã§é¢æ°ãªãã©ã«ã使ã£ãå ´åã«é常ã«é ããªã(ã¨ãããGCãå¤çºãã)åé¡ããã£ãã ãã¨ãã°ã function doit() { for (var i = 0; i < 1000; ++i) { for (var j = 0; j < 1000; ++j) { var o = { f: function () { return i + j; } }; } } } doit(); ã¨ããã³ã¼ãã node-0.6.19 ã§å®è¡ããã¨ã以ä¸ã®ããã« mark-sweep GC ã大éã«çºçãã¦å¦çã«æéãããã£ã¦ãããã¨ãåããã $ time /usr/local/node-0.6.19/bin/node -
{{#tags}}- {{label}}
{{/tags}}