[Groonga-commit] droonga/drnbench at 2359b07 [master] Use more generic name for attributes

Back to archive index

Kenji Okimoto okimo****@clear*****
Fri Oct 11 11:14:04 JST 2013


On 2013年10月11日 11:08, Kouhei Sutou wrote:
> In <52575A0A.3010604 �� clear-code.com>
>    "Re: [Groonga-commit] droonga/drnbench �� 2359b07 [master] Use more generic name for attributes" on Fri, 11 Oct 2013 10:53:14 +0900,
>    Kenji Okimoto <okimoto �� clear-code.com> wrote:
> 
>> 破壊的なメソッドを使っているので速度を求めているのだと思いますが、要素数が多い場合は、
>> sort_by を使った方が速いです。
>> 要素数が少ないと、違いを実感できないですが、ここがもしボトルネックになっているなら
>> sort_by を試してみてください。
> 
> ちょっと語弊があるので補足すると。。。
> 
> 必ずしもsortよりsort_byの方が速くなるわけではないので注意し
> てください。sort_byの方が速くなるのは、ざっくり言うと「要素そ
> のもので比較しないときだけ」です。今回のように要素そのもので
> ソートしている場合はsortの方が速いです。

そこまでは、意識できてなかったです。。。
補足してもらってありがとうございます。


-- 
Kenji Okimoto <okimoto �� clear-code.com>




More information about the Groonga-commit mailing list
Back to archive index