Enter a victory message that you would like all other players to see!
![slither.io](https://cdn-ak-scissors.b.st-hatena.com/image/square/ad5cd170f40d2492279f5222d55d9558e6ece4f5/height=288;version=1;width=512/http%3A%2F%2Fslither.io%2Fs%2Ffbthumb3.jpg)
PHPのプログラムを高速に処理をさせる書き方を紹介します。 1回1回の処理に人が知覚出来る程の差はないですが、ループの中や実行回数が多い処理では塵も積もれば山になります。 同じ処理を書くのでも、初期の実装から処理時間を意識する事で後に続く負荷テストや改修作業をずいぶん楽にしてくれます。 知ってさえいれば手間がかかる内容ではないので、是非参考にしてみてください。 インクリメント、デクリメントは後ろではなく前に 一般的に書籍でよく見るのは後ろですが、前に付けた方が高速に動きます。 for文などループでよく使うので、じわじわと効いてきます。 // 遅い例 for ( $i = 0; $i < 10000; $i++ ) { ... } for ( $i = 0; $i < 10000; $i-- ) { ... } // 速い例 for ( $i = 0; $i < 10000; ++$i )
Built-in Plugins Configuration Embulk configuration file format Local file input plugin CSV parser plugin JSON parser plugin Gzip decoder plugin BZip2 decoder plugin File output plugin CSV formatter plugin Gzip encoder plugin BZip2 encoder plugin Rename filter plugin Remove columns filter plugin Local executor plugin Guess executor Preview executor Logo Images Logo Square Horizontal Icon Customiza
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く