Please do test that, Jonathan! Please, others who can, please test this
latest on your pages. It's now passed all the tests I have, but I'm still a
bit worried that I have missed something.
I've finished checking the code back in. My weekend goal was to improve
basic performance of Jmol's handling of select and the manipulation of atom
sets. In case you are interested, the main difference was changing this sort
of construct:
for (int i = 0; i < atomCount; i++) {
if (bsSelected.get(i)) {
...some action
}
}
which performs the action on a limited set of selected atoms, to this:
for (int i = bsSelected.nextSetBit(0); i >= 0; i = bsSelected.nextSetBit(i +
1) {
...
}
This version goes far faster if only a limited number of atoms are selected,
because the skipping from one selected atom to another occurs at the bit
level within the BitSet class.
[ BitSet.nextSetBit() was added in Java 1.4 ]
On a simple test:
load =1sva filter "BIOMOLECULE 1;*.ca"
y = now()
for (var i = 0; i < 1000; i++) {
if (i % 100 == 0) { print i }
select symop > 3
}
print "" + NOW(y)
The difference between Jmol 11.8.18_dev (53 seconds) and Jmol 11.9.24_dev
(8.2 seconds) is dramatic. Even with the simple select
select atomno = i
in that loop, the differences are noticeable:
Jmol 11.9.24_dev 6.5 s
Jmol 11.8.18_dev 7.8 s
(A savings of 15%.) Of course, in doing this I found a few places where we
weren't doing what we thought we were doing.... So I also checked in a few
bug fixes for Jmol 11.8.
I added the now() function to 11.8 as an undocumented feature just so we
could do this sort of comparison.
Bob
On Mon, Feb 1, 2010 at 4:10 PM, Jonathan Gutow <[email protected]> wrote:
> Can't think of anything I've worked on that requires the backwards
> compatibility. We'll just have to test.
> Jonathan
> On Feb 1, 2010, at 3:58 PM, Robert Hanson wrote:
>
> > Well, a little project I started over the weekend turned into a
> > monster. But I think it's done, and if there are no bugs, I'll be
> > amazed. The goal was to increase performance speed, and one little
> > test I did suggested that script processing, in particular where
> > math or atom selections are involved, has increased in speed by
> > 10-50%. So I'm satisfied.
> >
> > But there was a price. Up until now we have had this line in
> > build.xml:
> >
> > source="1.3" target="1.1"
> >
> > That now reads
> >
> > source="1.4" target="1.4"
> >
> > For Jmol 11.9. Is there some reason we should be sticking with the
> > older compatibility? The Java 1.3 version is long out of service, I
> > think, and when I tried downloading it and installing it as a plug-
> > in to Firefox, and it just crashed the browser. The advantage of 1.4
> > appears to be some additional methods that work with BitSets (all
> > those atom and bond selections) that make those operations far more
> > efficient.
> >
> > Bob
> >
> > --
> > Robert M. Hanson
> > Professor of Chemistry
> > St. Olaf College
> > 1520 St. Olaf Ave.
> > Northfield, MN 55057
> > http://www.stolaf.edu/people/hansonr
> > phone: 507-786-3107
> >
> >
> > If nature does not answer first what we want,
> > it is better to take what answer we get.
> >
> > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
> >
> ------------------------------------------------------------------------------
> > The Planet: dedicated and managed hosting, cloud storage, colocation
> > Stay online with enterprise data centers and the best network in the
> > business
> > Choose flexible plans and management services without long-term
> > contracts
> > Personal 24x7 support from experience hosting pros just a phone call
> > away.
> > http://p.sf.net/sfu/theplanet-com
> > _______________________________________________
> > Jmol-developers mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
> Dr. Jonathan H. Gutow
> Chemistry Department [email protected]
> UW-Oshkosh Office:920-424-1326
> 800 Algoma Boulevard FAX:920-424-2042
> Oshkosh, WI 54901
> http://www.uwosh.edu/facstaff/gutow
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Jmol-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers