You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Ruby 2.4.0-preview3 㧠Hash ã¾ããã®æ¹åããã£ãã¨ãããã¨ã§ãpico_http_parser ã®ãã³ããã¼ã¯ãåã£ã¦ã¿ã Ruby 2.4.0-preview3 ãªãªã¼ã¹ GitHub - kazeburo/pico_http_parser: Fast HTTP Parser using picohttpparser ãã³ããã¼ã¯ã¯ãpico_http_parser/benchmark 以ä¸ã®scriptãçµæã¨ãã¦ã¯1.5åç¨åº¦ããã©ã¼ãã³ã¹ãä¸ãã£ã¦ãããã¨ã観測ã§ãã¾ããããªã¢ã«ãªã¢ããªã±ã¼ã·ã§ã³ã§ãé度ã¢ãããè¦è¾¼ããããããªãããªã¨æãã¾ããç´ æ´ããã ãããã0åã®æã ãããã©ã¼ãã³ã¹ãæªããªãã®ã¯ãHashã®è¦ç´ æ°ãå°ãªãã¨ãã®æé©åãå¤ãã£ãã®ããªã¨äºæ³
ææ¥ãã RubyKaigi ãªã®ã§ãã¡ãã£ã¨ããå°ãã¿ãä¸ã¤ã ä¾ãã°ã0 ãã 9999 ã¾ã§ãããã·ã¥ã«é ã«å ¥ãã¾ãã h = {} 10000.times do |n| h[n] = true end ãã®ã¨ããh[9998] ã h[9999] ã¯ãh[0] ã h[1] ããé«éã§ãã ã©ã®ãããé«éãã¨ããã¨ã 1_000_000_000.times { h } # 40.8 sec (ã«ã¼ãèªä½ã®é度) 1_000_000_000.times { h[9999] } # 57.2 sec 1_000_000_000.times { h[0] } # 89.1 sech[0] 㯠89.1 - 40.8 = 48.3 nsec ãh[9999] 㯠57.2 - 40.8 = 16.4 nsec ã¨ãããã¨ã«ãªãã¾ãããªã㨠3 åãéãã*1 ãªããããªãã¨ãèµ·ããã®ã ã
Wakameã¯ãµã¼ãã³ã¹ããå¤§å¹ ã«åæ¸ããå¼·åãªãªã¼ãã³ã½ã¼ã¹ã®ã¯ã©ã¦ãã³ã³ããã¼ã©ã§ããWakameã¨ã¯ ãWakameãã¯ãæ ªå¼ä¼ç¤¾ãããã ããä¸å¿ã¨ãªã£ã¦éçºãã¦ããããããã¯ã¼ã¯æ§æãèªåã§ããã¼ã¸ã¡ã³ãããããã®ã¨ã³ã¸ã³ã§ãããããã«é¢ãããµãããã¸ã§ã¯ããå«ãããã¸ã§ã¯ãã®ç·ç§°ã§ãã ãã£ã¨è¦ã ï¼ã¤ã®ç¹å¾´ ã¹ã¢ã¼ã«ã¹ã¿ã¼ã æå°æ§æã¯ãµã¼ãã¼ï¼å°ããæ§ç¯å¯è½ãäºç®ã®å°ãªããã¹ã¿ã¼ãã¢ããã®ä¼ç¤¾ãã社å ãã³ãã£ã¼ã®çæ§ãå°ãªãäºç®ããå§ãããã¾ãã ããã¸ã¡ã³ããããã¯ã¼ã¯ ãµã¼ãã¹ã«å¿ãã¦ãWebãµã¼ãã¹ãä½å°å¿ è¦ããã¼ã¿ãã¼ã¹ãä½å°å¿ è¦çã ãèªãè¨ç»ãããããã¯ã¼ã¯ãæ§ç¯ãããã¨ãã§ãã¾ãã ä»®æ³åããããããã¯ã¼ã¯ã·ã¹ãã ãå©ç¨ãããã¨ã«ãããæè»ãªãããã¯ã¼ã¯è¨è¨ãã½ããã¦ã§ã¢ã§ãµãã¼ããããã¨ãã§ãã¾ãã ãªã¼ãã¹ã±ã¼ãªã³ã° ãªã¢ã«ã¿ã¤ã ã®è² è·ç¶æ³ãç£è¦ãããã¨ã«ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}