{"version":"1.0","provider_url":"https://hatena.blog","author_name":"tmtms","title":"Ruby \u306e\u6587\u5b57\u5217\u30c7\u30fc\u30bf\u306e\u8907\u88fd\u306b\u3064\u3044\u3066","width":"100%","provider_name":"Hatena Blog","categories":["Ruby"],"height":"190","type":"rich","description":"Ruby \u3067 String \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8907\u88fd\u3057\u3066\u3082\u3001\u6587\u5b57\u5217\u30c7\u30fc\u30bf\u306f\u8907\u88fd\u3055\u308c\u307e\u305b\u3093\u3002 data = \"a\"*10*1024*1024 system \"grep ^VmSize /proc/#$$/status\" t1 = Time.now a = [] 100.times do |i| a.push data.dup end t2 = Time.now system \"grep ^VmSize /proc/#$$/status\" printf \"%.6f\\n\", t2-t1 \u5b9f\u969b\u306b10MB\u306e\u6587\u5b57\u5217\u3092\u4f5c\u3063\u3066\u3001100\u56dedup\u3059\u308b\u524d\u5f8c\u3067\u30d7\u30ed\u30bb\u30b9\u306e\u30e1\u30e2\u30ea\u30b5\u30a4\u30ba\u3092\u6bd4\u8f03\u3057\u3066\u307f\u3066\u3082\u5909\u308f\u3063\u3066\u307e\u305b\u3093\u3002 % ru\u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.tmtms.net%2Fentry%2F2016%2F05%2F28%2Fruby-string-cow\" title=\"Ruby \u306e\u6587\u5b57\u5217\u30c7\u30fc\u30bf\u306e\u8907\u88fd\u306b\u3064\u3044\u3066 - tmtms \u306e\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2016-05-28 15:21:27","blog_url":"https://blog.tmtms.net/","blog_title":"tmtms \u306e\u30e1\u30e2","author_url":"https://blog.hatena.ne.jp/tmtms/","image_url":null,"url":"https://blog.tmtms.net/entry/2016/05/28/ruby-string-cow"}