lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert engels <reng...@ix.netcom.com>
Subject Re: [jira] Created: (LUCENE-1257) Port to Java5
Date Wed, 09 Apr 2008 16:27:59 GMT
I think it is going to be highly JVM dependent.

I reworked it to call each twice (and reordered the tests)... the  
foreach is still faster. Ialso ran it on Windows (under Parallels)  
and got similar results, but in some cases the indexed was faster.

"server" times are tough to judge because normally the server is not  
going to compile until it hits it 10k times, but this can be  
configured...

I think this is a case where you need to make a judgement based on  
"expected behavior" as there are probably too many variables.

The 'foreach' should be faster in the general case for arrays as the  
bounds checking can be avoided.

But, I doubt the speed difference is going to matter much either way,  
and eventually the JVM impl will converge to near equal performance.


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


Mime
View raw message