--- William James <[EMAIL PROTECTED]> wrote:
> Bjorn Helgason wrote:
>
> > 65 66 67{a.
>
> Thanks. I needed this to convert a simple program that
> was posted on the Ruby newsgroup to J.
>
[...]
>
> Here's my J version.
>
> read =: 1!:1
> write =: 1!:2
> scramble =: verb define
> ((128 (23 b.) a. i. read <y) { a. ) write <y,'.scrambled'
> )
>
> The J program is about 24 times as fast.
> The version I wrote in FreeBasic is 9 times as fast as J.
Good news. A test on another computer shows that J is faster
in relation to a compiled FreeBasic program than I thought.
The first test was done on a computer clocked at 800MHz and
equipped with 256MB of RAM. The data file was about 650kilobytes.
This test was on a computer clocked at 3GHz with 1GB of RAM.
The size of the data file was 10,332,028 bytes.
FreeBasic: 0.1221480685554521 sec.
J: 0.406 sec.
The ratio is about 3.3.
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.
____________________________________________________________________________________
Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm