Monday, November 29, 2010

Cache::LRU (a handy and fast in-memory cache module in pure-perl)

Last week, after not being able to find a handy and fast cache module, I decided to write one by myself, and the outcome is Cache::LRU.

Cache::LRU is an in-memory cache module written in pure-perl. It has no dependencies, and the code is less than 100 lines long. Yet it is faster than other modules as the result of a primitive benchmark shows (note: Cache::FastMmap is a shared-memory cache and the overhead of inter-process communication needs to be taken into consideration).

$ perl -Ilib benchmark/
                          Rate Cache::Ref::LRU (List) Cache::FastMmap Cache::Ref::LRU (Array) Cache::FastMmap (raw) Tie::Cache::LRU Cache::LRU
Cache::Ref::LRU (List)  29.1/s                     --            -14%                    -31%                  -37%            -72%       -80%
Cache::FastMmap         33.9/s                    17%              --                    -20%                  -27%            -68%       -77%
Cache::Ref::LRU (Array) 42.3/s                    45%             25%                      --                   -9%            -60%       -71%
Cache::FastMmap (raw)   46.4/s                    60%             37%                     10%                    --            -56%       -69%
Tie::Cache::LRU          105/s                   260%            209%                    147%                  125%              --       -29%
Cache::LRU               148/s                   408%            336%                    249%                  218%             41%         --

            (warning: too few iterations for a reliable count)
            (warning: too few iterations for a reliable count)
            (warning: too few iterations for a reliable count)
                       s/iter Cache::Ref::LRU (List) Tie::Cache::LRU  Cache::LRU
Cache::Ref::LRU (List)   3.02                     --            -43%        -70%
Tie::Cache::LRU          1.71                    77%              --        -47%
Cache::LRU              0.910                   232%             88%          --
$ uname -a
Darwin ******** 10.5.0 Darwin Kernel Version 10.5.0: Fri Nov  5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEASE_I386 i386

Sunday, October 31, 2010

The Transfer of and the New Login Method (using Twitter)

As announced at Kazuho@Cybozu Labs: Announce: The Transfer of, the ownership of the two services Mylingual and Japanize has been transferred from Cybozu Labs, Inc. to myself. Along with the transfer the services now use Twitter to authenticate the tranlators editing the localization data.

Thank you for your cooperation and supporting Mylingual / Japanize.

Japanize の移管完了のご報告と新ログイン方法 (Twitter 認証) のご案内

Kazuho@Cybozu Labs: Japanize / Mylingual サービス移管のおしらせ」でご案内させていただきましたとおり、2010年10月29日をもちまして Japanize および Mylingual の両サービスをサイボウズ・ラボ株式会社より、私、奥一穂個人へ移管いたしました。

と同時に、ログイン方法を従来のものから Twitter を利用するよう変更させていただきました(移管に際し、パスワードやメールアドレス等の個人情報は引き継いでおりません)。翻訳者の皆様にはご不便をおかけしますが、Twitter を利用してログインいただきますよう、よろしくお願いいたします。

以上、とりいそぎご報告する次第です。今後とも Japanize と Mylingual をよろしくお願いいたします。