Re: [Jmol-developers] Loop speed optimization potential

2015-04-08 Thread Robert Hanson
On Wed, Apr 8, 2015 at 4:48 AM, Rolf Huehne rhue...@fli-leibniz.de wrote: Q: Does 'i' contain the hash key (as in Perl) or the value? the key -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop

Re: [Jmol-developers] Loop speed optimization potential

2015-04-04 Thread Robert Hanson
Rolf, I think you could have a lot of fun with the JavaScript functions Jmol provides. Jmol never does loops like that. Instead it initializes a three-dimensional binary tree -- we call it a binary forest :) -- and you specify a point and a radius, then iterate until done. It is far far faster.

Re: [Jmol-developers] Loop speed optimization potential

2015-04-03 Thread Angel Herráez
Hi Rolf I was about to suggest what Bob is putting forward: if Javascript is faster, you might take part of the code out from JmolScript into JavaScript. I believe he has demo'ed how. Another idea: I found that in Javascript there is much improvement in loops when they are decrementing

Re: [Jmol-developers] Loop speed optimization potential

2015-04-02 Thread Robert Hanson
Rolf, you are definitely pushing the limit there, I think. What exactly happens inside the loop you are really interested in using? If it is anything much, then the looping itself is going to be insignificant compared to the other processing. I probably will regret suggesting this, but something