Ian Lewis
Ian Lewis is a web developer living in Tokyo Japan. His current interests are in Django, python, alternative databases and rapid web application development. About Me...
  • pytyrantはpython-tokyotyrantよりずっと速い

    夏のPython温泉Bob様が作ってくれたピュアーパイソンクライアントpytyrant酒徳さんpython-tokyotyrantより速いという話を聴いたとmoriyoshiさんに言った。それで、moriyoshiさんはprofileのテストを作ってくれたけど、結果として、pytyrantとpython-tokyotyrantはあまり変わらないのが出た。

    でも、このコードは一つのスレッドでテストしている。複数のクライアントが同時に接続している場合はどうかと思って、今日テストを作ってみた。

    これを実行するとpytyrantのほうがずっと速い.

    python-tokyotyrant
    ********************
    Running 20 threads took 6.755 seconds
    Running 20 threads took 5.392 seconds
    Running 20 threads took 5.516 seconds
    Running 20 threads took 27.191 seconds
    Running 20 threads took 30.575 seconds
    Running 20 threads took 34.699 seconds
    pytyrant
    ********************
    Running 20 threads took 1.748 seconds
    Running 20 threads took 1.736 seconds
    Running 20 threads took 1.716 seconds
    Running 20 threads took 8.922 seconds
    Running 20 threads took 8.716 seconds
    Running 20 threads took 8.746 seconds
    理由が分からないけども、python-tokyotyrantはPyRexを使ったわけですかね?
    Send feedback   このエントリーを含むはてなブックマーク はてなブックマーク - pytyrantはpython-tokyotyrantよりずっと速い
  • Python温泉 06/2009

    Python温泉に参加しに行ってきました。今回はいろいろ話が上がりましたけど、特に未来的な話が一番面白かったのかなと思います。ウェブなど日本なサービスがどうなるのかが特に気になります。アメリカでは、クラウドサービスやマイクロペイメントサービスが色々栄えそうだが、日本では頭が固いから、そのまま栄えない可能性が高いので、オリジナルサービスやアイディアを考えないと行けない。多言語化がやっぱり複数の言語をサポートすることのみではなくて、文化や地元の事情を考えながら、地元の機能を作ること。

    あと、 酒徳 さんが作ったtokyotyrant ライブラリのC バインディング python-tokyotyrantBob が作ったピュアPythonクライアント実装 pytyrant に意外と負けるという話が上がって、 moriyoshi さんがどうしても信じなくて、 プロファイリングテスト を作ってくれた。やっぱりローカルでCバインディングのほうが早い。ネットを通るとどうなるのが気になりますけど。

    僕の作ったものは 前と書いた通りdisqus のAPIの Python クライアント を作って見ました。アップデート実装がまだ出来ていないので、ご注意。

    Send feedback   このエントリーを含むはてなブックマーク はてなブックマーク - Python温泉 06/2009