Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: immutable BigInteger




On Oct 16, 2007, at 1:04 PM, Eduard de Jong wrote:

It seems there is a lot of agreement on the details....

True


A program that is not thread safe is an INCORRECT program. Whatever speed&memory performance gain it has it still is a broken program, it CAN FAIL AT ANY TIME.

Only if a shared resource is used from multiple threads. Then provision must be made to ensure it is thread safe. This is obviously a feature you feel can't be ignored. Maybe the BigInteger designers felt the same and so we have immutable and no mutable classes, or mutable utility methods, or any other mutable option.

Then, I think you have an issue with the design of the BigInteger class in complaining about it being hard to use efficiently to implement more complex algorithms, like typically used in cryptography.

Immutable is not well suited to any highly iterative use. This is not just restricted to cryptography and not even just to BigInteger. With a lot of looping and immutable objects many temporaries will be created and less optimal memory management will have a side effect of less than optimal performance from my experience.

Good luck with your experiments

Thanks. They have had some success so far and since I believe that was the result of what we've discussed and not luck, I believe there should be some further success.

Mike Hall        hallmike at att dot net
http://www.geocities.com/mik3hall
http://sourceforge.net/projects/macnative



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: immutable BigInteger (From: Michael Hall <email@hidden>)
 >Re: immutable BigInteger (From: Eduard de Jong <email@hidden>)
 >Re: immutable BigInteger (From: Michael Hall <email@hidden>)
 >Re: immutable BigInteger (From: Eduard de Jong <email@hidden>)
 >Re: immutable BigInteger (From: Michael Hall <email@hidden>)
 >Re: immutable BigInteger (From: Eduard de Jong <email@hidden>)
 >Re: immutable BigInteger (From: Michael Hall <email@hidden>)
 >Re: immutable BigInteger (From: Eduard de Jong <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.