On 9/24/07, William James <[EMAIL PROTECTED]> wrote:
> I'll run the original test again on the slower computer when I
> get home. If the result is different than it originally was
> I'll post it and try to figure out an explanation.
You might be using swap space as memory.
For a 10 MB file, this line
((128 (23 b.) a. i. read <y) { a. ) write <y,'.scrambled'
will produce intermediate results at least 80MB in size.
a.i.read<y
would be 40MB, and 128 (23 b.)a.i.read<y would be another
40MB
Hypothetically speaking, if J allowed you to use character
values as indices, you could build a 256 character table
and index into that. However, I do not think J allows you to do
this. And even there you'd have at least 20MB in intermediate
results.
Another speed up, assuming you are hitting swap, would be
to read in and convert a block of characters at a time, appending
the converted text to the result file. With appropriately sized
blocks (1MB or 100K characters might be appropriate), you
might stay under your machine's threshold for fast virtual
memory.
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm