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ページを開く