Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Rosetta Code: Long List is Long (faster)

by marioroy (Prior)
on Dec 29, 2022 at 08:51 UTC ( [id://11149181]=note: print w/replies, xml ) Need Help??


in reply to Re: Rosetta Code: Long List is Long (faster)
in thread Rosetta Code: Long List is Long

I tried the J script demonstration, by Anonymous Monk, on a box running Clear Linux. The following are the steps taken.

Installation:

cd ~/Downloads wget http://www.jsoftware.com/download/j903/install/j903_linux64.tar.g +z tar xzf j903_linux64.tar.gz -C ~/

Script modification:

Next, I made a change to not output CR so able to compare against original output without CR. For some reason, pressing a key or the return key does not exit the script (resolved by removing two lines).

$ diff llil.ijs llil2.ijs 50c50 < text =: , words ,. TAB ,. (nums ,. CR) ,. LF --- > text =: , words ,. TAB ,. nums ,. LF 64,65d63 < echo 'Finished. Waiting for a key...' < stdin ''

Non-AVX results:

$ ~/j903/bin/jconsole llil2.ijs big1.txt big2.txt big3.txt out.txt Read and parse input: 0.850145 Classify, sum, sort: 2.08596 Format and write output: 1.24986 Total time: 4.18597

AVX2 results:

From the wiki, "The initial installation is non-AVX and finishing the steps upgrades to AVX or AVX2 as appropriate."

# Update J engine to AVX or AVX2, depending on the CPU. $ ~/j903/updateje.sh Engine: j903/j64avx2/linux Release-b: commercial/2022-01-28T04:13:29 Library: 9.03.08 Platform: Linux 64 Installer: J903 install InstallPath: /home/mario/j903 Contact: www.jsoftware.com $ ~/j903/bin/jconsole llil2.ijs big1.txt big2.txt big3.txt out.txt Read and parse input: 0.789199 Classify, sum, sort: 1.56741 Format and write output: 1.12442 Total time: 3.48103

Anonymous Monk, blessings and grace. Thank you, for the J Programming Language demonstration.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11149181]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-29 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found