[ 
https://issues.apache.org/jira/browse/LUCENE-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13241166#comment-13241166
 ] 

Dawid Weiss commented on LUCENE-3935:
-------------------------------------

Ah, this brings back a small project that kind of lies in a dormant state for 
some time -- I've written an annotation processor that generated classes for 
handling arrays of struct-like types (objects with fields only), including 
flattened multi-dimensional arrays. The code is on a branch here --

https://github.com/carrotsearch/hppc/blob/structs/hppc-examples/src/main/java/com/carrotsearch/hppc/examples/BattleshipsCell.java

But it's been a while, I need to get back to it, it may be useful.
                
> Optimize Kuromoji inner loop - rewrite ConnectionCosts.get() method
> -------------------------------------------------------------------
>
>                 Key: LUCENE-3935
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3935
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/analysis
>    Affects Versions: 3.6, 4.0
>            Reporter: Christian Moen
>
> I've been profiling Kuromoji, and not very surprisingly, method 
> {{ConnectionCosts.get(int forwardId, int backwardId)}} that looks up costs in 
> the Viterbi is called many many times and contributes to more processing time 
> than I had expected.
> This method is currently backed by a {{short[][]}}.  This data stored here 
> structure is a two dimensional array with both dimensions being fixed with 
> 1316 elements in each dimension.  (The data is {{matrix.def}} in 
> MeCab-IPADIC.)
> We can rewrite this to use a single one-dimensional array instead, and we 
> will at least save one bounds check, a pointer reference, and we should also 
> get much better cache utilization since this structure is likely to be in 
> very local CPU cache.
> I think this will be a nice optimization.  Working on it... 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to