Disclaimer: This is my personal blog. The views expressed on this page are mine alone and not those of my employer. This post is about JavaScript performance but I would like to start it by telling a story that might seem unrelated to JS. Please bear with me if you donât like C. A story of a C programmer writing JavaScript Mr. C. is a C programmer as you can probably guess from his name. Today he
RubyInlineé¢ç½ãï¼ç¹å¾´ã¨ãã¦ã¯ Cã®ã³ã¼ããRubyã¸ã·ã³ãã«ã«åãè¾¼ã ã³ã³ãã¤ã«ã¯ä¸è¦ï¼è£ã§ãã£ã¦ãããï¼ ã³ã³ãã¤ã«çµæã¯ãã£ãã·ã¥ãã ã¤ã³ã¹ãã¼ã«ã¯Gemãã ã¦ããæããã¨ãããã10000åå ç®ã§ã試ãã¦ã¿ããã¾ãgemããã¤ã³ã¹ãã¼ã« gem install RubyInline ãã¤ãéãå®äºãã§ä½¿ã£ã¦ã¿ã require "rubygems" require "inline" class Test inline do |builder| builder.c <<-EOF int plus_inline(int x, int y){ int z=0; int a; for(a=0; a<y; a++){ z = z + x; } return z; } EOF end def plus_ruby(x,y) z = 0 y.times{ z += x } ret
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}