The included class file should be very close to what is needed. It is not thoroughly tested however. I did not try to fully optimize the computing but the class should provide the functionality that is needed. It is not well commented also. May be someone can review it and test it .If something is missing or the testing fail let me know.
Regards.
Guy(See attached file: UnsignedLong.java)
Doug Schaefer ---04/05/2013 09:37:09 AM---I think you need to look at the implementation of BigInteger before claiming it's not a performance
From: Doug Schaefer <dschaefer@xxxxxxx>
To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>, David Wang <kuoweiwang@xxxxxxxxx>, Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx>,
Date: 04/05/2013 09:37 AM
Subject: Re: [cdt-dev] Bug ID 403404
Sent by: cdt-dev-bounces@xxxxxxxxxxx
I think you need to look at the implementation of BigInteger before claiming it's not a performance problem. At the very least, it's really big.
It's easy to imagine a much more performant and small implementation if you know how many bits you're trying to handle. For example, with 128-bits, you can use double word algorithms are as old as I am and maximize performance.
Doug.
From: <Oberhuber>, Martin <Martin.Oberhuber@xxxxxxxxxxxxx>
Reply-To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Friday, 5 April, 2013 8:51 AM
To: David Wang <kuoweiwang@xxxxxxxxx>, "CDT General developers list." <cdt-dev@xxxxxxxxxxx>, Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx>
Subject: Re: [cdt-dev] Bug ID 403404
StackOverflow recommends BigInteger and doesn’t talk about inefficiency.
Starting with BigInteger now, it should be fairly straightforward to refactor into a different class with the same API later (ie simple search & replace on the name BigInteger and the import statements for its package). That is, only if performance measurement shows that it’s in fact a problem.
Or are you concerned that the API of BigInteger is already inefficient ? – Are you concerned about memory size or performance ?
Thanks,
Martin
--
Martin Oberhuber, SMTS / Product Architect – Development Tools, Wind River
direct +43.662.457915.85 fax +43.662.457915.6
DISCLAIMER: Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You. _______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
DISCLAIMER:
Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.
Thank You.