BigInteger performance improvements

2008-01-30 Thread Alan Eliasen
I'm planning on tackling the performance issues in the BigInteger class. In short, inefficient algorithms are used for multiplication, exponentiation, conversion to strings, etc. I intend to improve this by adding algorithms with better asymptotic behavior that will work better for large numb

Re: purpose of FileDispatcher.preClose()

2008-01-30 Thread Alan Bateman
Michael Allman wrote: : I think the problem here is that FileChannelImpl.implCloseChannel() calls nd.preClose(fd) before the block that releases its file locks. On non-windows, nd.preClose(fd) doesn't just "pre close" fd, it closes it. Then implCloseChannel() tries to release its file locks.

Re: [PATCH] FileChannelImpl.c.Java_sun_nio_ch_FileChannelImpl_truncate0

2008-01-30 Thread Alan Bateman
Michael Allman wrote: This must have been on somebody's plate for a long time. Attached please find a patch to correct an apparently unreported bug. At least, I couldn't find one. I think this is the bug you are looking for: http://bugs.sun.com/view_bug.do?bug_id=6191269 It is fixed in

Re: purpose of FileDispatcher.preClose()

2008-01-30 Thread Michael Allman
On Wed, 30 Jan 2008, Alan Bateman wrote: Michael Allman wrote: Hello, Can someone with knowledge of such matters explain what FileDispatcher.preClose() is supposed to do on Solaris/Linux. I mean, I see the code, but I don't understand why it exists or what problem it's supposed to avoid or

Re: [PATCH] FileChannelImpl.c.Java_sun_nio_ch_FileChannelImpl_truncate0

2008-01-30 Thread Tim Bell
Hi Michael Allman wrote: This must have been on somebody's plate for a long time. Attached please find a patch Thanks for sending your suggested fix our way. I will do some additional searching to see if I can locate an existing Bug-ID for this issue. I don't find your name on the SCA list

[PATCH] FileChannelImpl.c.Java_sun_nio_ch_FileChannelImpl_truncate0

2008-01-30 Thread Michael Allman
This must have been on somebody's plate for a long time. Attached please find a patch to correct an apparently unreported bug. At least, I couldn't find one. The problem is that if a FileChannel is truncated and its position was previously set beyond the new length of the file, the position

Re: purpose of FileDispatcher.preClose()

2008-01-30 Thread Alan Bateman
Michael Allman wrote: Hello, Can someone with knowledge of such matters explain what FileDispatcher.preClose() is supposed to do on Solaris/Linux. I mean, I see the code, but I don't understand why it exists or what problem it's supposed to avoid or something. I ask because I'm trying to f

purpose of FileDispatcher.preClose()

2008-01-30 Thread Michael Allman
Hello, Can someone with knowledge of such matters explain what FileDispatcher.preClose() is supposed to do on Solaris/Linux. I mean, I see the code, but I don't understand why it exists or what problem it's supposed to avoid or something. I ask because I'm trying to fix a file-locking probl