This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: kawa numerics unstable


On 09/20/2009 09:48 AM, alex mitchell wrote:
Yes, that's correct - the breakage actually starts from rev 6376. I just
tested with 6375 and my code works. For 6376 I get
java.lang.ClassCastException: java.lang.Integer cannot be cast to
gnu.math.Numeric. I'll try to track this down in my code and see if I can
isolate a test case.

Wait until I've checked some code in. This changes how Numeric gets converted.

Now there may a performance issue, since we convert from int to
java.lang.Integer to gnu.math.Numeric (once that is working).
(This didn't use to be an issue, because gnu.math.IntNum
inherits from gnu.math.Numeric.)  So it would still be useful to
note and isolate this; perhaps the compiler can be fixed to
avoid the double conversion.

For the performance problems, I have a feeling it may not be directly
related to kawa. I recall having to switch over from Java 5 to Java 6 on my
Mac a few weeks back, as kawa would no longer compile. I don't remember
seeing the performance issues before switching over, and my code runs as
fast as before on Windows and Ubuntu.

The compile error using Java 5 on MacOS is:
(compiling rnrs/unicode.scm to kawa.lib.rnrs.unicode)
rnrs/unicode.scm:110:3: no known slot 'normalize' in java.lang.Object
rnrs/unicode.scm:110:39: no known slot 'NFD' in java.lang.Object
rnrs/unicode.scm:113:3: no known slot 'normalize' in java.lang.Object
rnrs/unicode.scm:113:39: no known slot 'NFKD' in java.lang.Object
rnrs/unicode.scm:116:3: no known slot 'normalize' in java.lang.Object
rnrs/unicode.scm:116:39: no known slot 'NFC' in java.lang.Object
rnrs/unicode.scm:119:3: no known slot 'normalize' in java.lang.Object
rnrs/unicode.scm:119:39: no known slot 'NFKC' in java.lang.Object
make[2]: *** [scm-classes.stamp] Error 255
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Ah, yes. Those are Java6-only. I need to test building on JAVA5.

Alex



On 9/20/09 11:51 PM, "Per Bothner"<per@bothner.com> wrote:


On 09/19/2009 10:25 PM, alex mitchell wrote:
By the way, I already noticed some performance problems as a result of
recent changes (something between 6330 and 6365),

The change to map int->java.lang.Integer instead of int->gnu.math.IntNum was revision 6376, so that doesn't seem to have been the performance problem, but it may be the cause of the breakage you're seeing.




--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]