You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2010/12/19 12:47:01 UTC

[jira] Updated: (LUCENE-2824) optimizations for bufferedindexinput

     [ https://issues.apache.org/jira/browse/LUCENE-2824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-2824:
--------------------------------

    Attachment: LUCENE-2824.patch

here's the patch. i reverted my previous backwards break for the no-payloads optimization since this is actually faster overall.

Here's standard codec (trunk). I've run this benchmark about 5 times to be sure.
||Query||QPS trunk||QPS patch||Pct diff||
|uni*|11.41|11.36|{color:red}-0.5%{color}|
|unit*|20.57|20.47|{color:red}-0.5%{color}|
|un*d|31.56|31.63|{color:green}0.2%{color}|
|united~2.0|1.66|1.67|{color:green}0.5%{color}|
|unit~1.0|5.21|5.23|{color:green}0.5%{color}|
|unit~2.0|5.09|5.14|{color:green}0.9%{color}|
|united~1.0|7.61|7.69|{color:green}1.0%{color}|
|unit state|7.11|7.21|{color:green}1.3%{color}|
|spanNear([unit, state], 10, true)|2.67|2.72|{color:green}2.0%{color}|
|state|25.09|25.61|{color:green}2.1%{color}|
|+nebraska +state|69.29|70.84|{color:green}2.2%{color}|
|u*d|8.44|8.71|{color:green}3.2%{color}|
|"unit state"|4.98|5.17|{color:green}3.8%{color}|
|+unit +state|7.34|7.70|{color:green}4.8%{color}|
|spanFirst(unit, 5)|10.27|11.35|{color:green}10.5%{color}|

the optimization is more important though for the methods like readInt (15% faster in my tests)


> optimizations for bufferedindexinput
> ------------------------------------
>
>                 Key: LUCENE-2824
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2824
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 3.1, 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-2824.patch
>
>
> along the same lines as LUCENE-2816:
> * the readVInt/readVLong/readShort/readInt/readLong are not optimal here since they defer to readByte. for example this means checking the buffer's bounds per-byte in readVint instead of per-vint.
> * its an easy win to speed this up, even for the vint case: its essentially always faster, the only slower case is 1024 single-byte vints in a row, in this case we would do a single extra bounds check (1025 instead of 1024)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org