{"title":"1,000,000 \u56de assoc! \u3092 transient \u306a map \u306b\u884c\u3063\u305f\u3051\u3069\u3001 8 \u500b\u3057\u304b\u5024\u304c\u5165\u3063\u3066\u3044\u306a\u3044\u306e\u306f\u4f55\u6545?","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fayato.hateblo.jp%2Fentry%2F20150417%2F1429226577\" title=\"1,000,000 \u56de assoc! \u3092 transient \u306a map \u306b\u884c\u3063\u305f\u3051\u3069\u3001 8 \u500b\u3057\u304b\u5024\u304c\u5165\u3063\u3066\u3044\u306a\u3044\u306e\u306f\u4f55\u6545? - (define -ayalog &#39;())\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://ayato.hateblo.jp/entry/20150417/1429226577","width":"100%","provider_url":"https://hatena.blog","blog_title":"(define -ayalog '())","type":"rich","image_url":null,"blog_url":"https://ayato.hateblo.jp/","version":"1.0","description":"Why inserting 1000 000 values in a transient map in Clojure yields a map with 8 items in it?\u8208\u5473\u6df1\u304b\u3063\u305f\u3002\u30d9\u30af\u30bf\u30fc\u306b\u5bfe\u3057\u3066\u540c\u69d8\u306e\u3053\u3068\u3092\u884c\u3063\u305f\u5834\u5408\u306f\u671f\u5f85\u901a\u308a\u306b\u52d5\u304f\u3051\u3069\u3001\u30de\u30c3\u30d7\u306b\u5bfe\u3057\u3066\u3060\u3068\u52d5\u304b\u306a\u3044\u3068\u3044\u3046\u4f8b\u3002 (count (let [m (transient [])] (dotimes [i 1000000] (assoc! m i i)) (persistent! m))) ; => 1000000 (count (let [m (transient {})] (dotimes [i 1000000] (\u2026","author_name":"ayato0211","author_url":"https://blog.hatena.ne.jp/ayato0211/","provider_name":"Hatena Blog","categories":["Clojure","stackoverflow"],"height":"190","published":"2015-04-17 08:22:57"}