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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.