エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント1件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
文字列結合のパフォーマンス - プログラミング日記
Efficient String Concatenation in Python (http://www.skymind.com/~ocrow/python_string/) 2.5.2でテ... Efficient String Concatenation in Python (http://www.skymind.com/~ocrow/python_string/) 2.5.2でテスト。 import time def profile(func): def foo(*a, **k): t = time.time() r = func(*a, **k) print '%s: %g sec elapsed' % (func.__name__, time.time() - t) return r return foo @profile def method1(): out_str = '' for num in xrange(loop_count): out_str += `num` return out_str @profile def method2(): from UserStr
2008/11/12 リンク