<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/579979#M78723</link>
    <description>&lt;P&gt;thank you &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;could you please estimate the effect of using invisible and private tables on the different methods? they must be the fastest way to amend any script for boosting performance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 11 Dec 2022 19:32:38 GMT</pubDate>
    <dc:creator>ron_horne</dc:creator>
    <dc:date>2022-12-11T19:32:38Z</dc:date>
    <item>
      <title>Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381360#M63185</link>
      <description>&lt;P&gt;A recent Community Discussion&amp;nbsp;&lt;LI-MESSAGE title="script to find and replace a numeric value with a missing value in the whole table" uid="380971" url="https://community.jmp.com/t5/Discussions/script-to-find-and-replace-a-numeric-value-with-a-missing-value/m-p/380971#U380971" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;had a very nice entry provided by&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/12549"&gt;@SDF1&lt;/a&gt;&amp;nbsp;that was selected as the solution&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=current data table();
For( i = 1, i &amp;lt;= N Rows( dt ), i++,
	For( l = 1, l &amp;lt;= N Cols( dt ), l++,
		If( Column( l )[i] == 999,
			Column( l )[i] = .
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I viewed the solution, an old teaching popped into my brain that roughly stated is, "Don't loop through a data table.&amp;nbsp; Looping is slow. Use the JMP built in capabilities."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I started out to modify&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/12549"&gt;@SDF1&lt;/a&gt;&amp;nbsp;code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I determined that my fallback standard of "Get Rows Where()" would be faster.&amp;nbsp; After all, it allows all found rows to be set with one assignment statement, after the "very fast" Get Rows Where() has found the rows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another solution, that I have seen &lt;STRIKE&gt;pushed&lt;/STRIKE&gt;&amp;nbsp;recommended by the community is the Recode facility in JMP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hypothesis: The built in JMP functions of Get Rows Where and Recode will be faster than Looping down and across an entire data table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I selected the Semiconductor Capability data table as a good sized table, 132 columns and 1455 rows&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote a little script that sets 10 random values in each column to 999.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=current data table();
for(i=5,i&amp;lt;=ncols(dt),i++,
	if(col stddev(ascolumn(dt,i))!=0,
	for(k=1,k&amp;lt;=10,k++,
		column(dt,i)[randominteger(1,1455)]=999;
	)
));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
start = HP Time();
For( i = 5, i &amp;lt;= N Cols( dt ), i++,
	dt &amp;lt;&amp;lt; Recode Column(
		As Column( dt, i ),
		{If( _rcNow == 999, ., _rcNow )},
		Target Column( As Column( dt, i ) )
	)
);
show(hptime()-start)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is the original value to be changed in the Discussion&amp;nbsp; mentioned above.&amp;nbsp; The 999 is to be changed to missing (.) by the scripts.&lt;/P&gt;
&lt;P&gt;Method:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Startup JMP 16.&lt;/LI&gt;
&lt;LI&gt;Read in the Semiconductor Capability data table&lt;/LI&gt;
&lt;LI&gt;Run the script to set the 999 values in each column&lt;/LI&gt;
&lt;LI&gt;Repeat the above 2 steps for each of the 3 methods and recode the time down to the millisecond.&lt;/LI&gt;
&lt;LI&gt;Repeat the above steps for JMP15&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Here is the script for the Recode&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
start = HP Time();
For( i = 5, i &amp;lt;= N Cols( dt ), i++,
	dt &amp;lt;&amp;lt; Recode Column(
		As Column( dt, i ),
		{If( _rcNow == 999, ., _rcNow )},
		Target Column( As Column( dt, i ) )
	)
);
show(hptime()-start)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The code for the Get Rows Where&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=current data table();
start=hptime();
for(i=5,i&amp;lt;= ncols(dt),i++,
	column(dt,i)[dt&amp;lt;&amp;lt;get rows where(ascolumn(dt,i)==999)]=.;
	if(mod(i,10)==0,show(i));
);
show(hptime()-start)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And here are the surprising results&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="surprise.PNG" style="width: 540px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32495iFAB7C477BFABB288/image-size/large?v=v2&amp;amp;px=999" role="button" title="surprise.PNG" alt="surprise.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The For Loop wins hands down.&amp;nbsp; And from the results, the Get Rows Where should be used sparingly.&lt;/P&gt;
&lt;P&gt;Comments and corrections are welcomed......&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:29:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381360#M63185</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-06-10T23:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381406#M63191</link>
      <description>&lt;P&gt;I have been doing some optimization at work to some old scripts we have. Some of the stuff that that I had to change were related to get rows where. I have started to use more and more matrix operations (mostly Loc()) if I need to have fast JSL code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example you could change the get rows where to following (didn't test if it replaces correct values or all of them):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;start=hptime();
for(i=5,i&amp;lt;= ncols(dt),i++,
	column(dt,i)[Loc(ascolumn(dt,i) &amp;lt;&amp;lt; get as matrix, 999)]=.;
	if(mod(i,10)==0,show(i));
);
show(hptime()-start);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is also option of using column properties Value Labels and Missing Value Codes which might work in some cases. I like using them when possible, because then you won't be changing the data.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 17:39:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381406#M63191</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-04-30T17:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381417#M63194</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Your matrix based code came in as the fastest.&lt;/P&gt;
&lt;P&gt;0.299795 seconds........&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 17:50:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381417#M63194</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-04-30T17:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381423#M63197</link>
      <description>&lt;P&gt;Maybe &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt; could have us even faster solution. I have gotten the idea to use Matrix calculations (especially Loc()) from his community posts/blog.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have made one tool at work faster which opens dataset and then deletes old data (based on user selection). Originally it used &amp;lt;&amp;lt; Select Where and Delete rows. I replaced it with some Loc() magic and it got also way faster. I have been really liking Loc() a lot lately.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 17:58:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381423#M63197</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-04-30T17:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381439#M63198</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Very interesting comparison, and not the results I would have expected, either. I remember when I first started with learning programming in college and was also taught something similar: be wary of loops because they're slow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; For sure, with some calculations and in some programs, I have found For loops to be very slow -- slower than the alternatives. Not being all that great of a programmer, though, I tend to fall back on what I know how to do, which isn't always quick or elegant. Sometimes for me, the logic of a loop allows me to write a functioning code to do what I want it to do, which allows me to move on to the next steps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I find it interesting that the For Loop and Recode options are slightly slower for JMP 16 versus 15, but the Get Rows Where improved by cutting the time almost in half, that's a substantial change.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 18:19:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381439#M63198</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2021-04-30T18:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381444#M63199</link>
      <description>&lt;P&gt;I agree that Loc() is the best method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For me, the slow down seems to occur because of As Column. I see a significant difference between,&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;start = HP Time();
For( i = 5, i &amp;lt;= N Cols( dt ), i++,
    As Column( column(dt, i) );
);
Show( HP Time() - start );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;start = HP Time();
For( i = 5, i &amp;lt;= N Cols( dt ), i++,
    As Column( dt, i );
);
Show( HP Time() - start );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Changing the As Column syntax in the code from&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;original question, the For loop is still the fastest but the others are more comparable.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 18:26:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381444#M63199</guid>
      <dc:creator>Ryan_Gilmore</dc:creator>
      <dc:date>2021-04-30T18:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381446#M63200</link>
      <description>&lt;P&gt;So we skip AsColumn() with (going more with a hunch and I have not tested that this will replace all correct values):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;start=hptime();
for(i=5,i&amp;lt;= ncols(dt),i++,
	column(dt,i)[Loc(dt[0,i], 999)]=.;
	if(mod(i,10)==0,show(i));
);
show(hptime()-start);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Apr 2021 18:41:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381446#M63200</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-04-30T18:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381448#M63202</link>
      <description>&lt;P&gt;I might have been wary of using loops at some point but after taking one algorithm course (which I never did finish..) a little less so. You just have to be efficient with them, quite often you loop way too much (time complexity and&amp;nbsp; Big O notation). Also using loops is way easier than trying to solve problems with pure mathematics.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With JMP I usually just go with the safe options I have learned at some point, as the speed is rarely an issue. But when the time is an issue (one application took over 6 minutes to open at work) I will start looking for ways to make it faster (managed to make it start in less than 2 minutes). In this case I managed to make it faster by using Loc() with different combinations of other functions (delete row, set row state).&lt;/P&gt;&lt;P&gt;In addition to Loc(), using Summarize() seems to be "way" faster when compared to my long favorite option to getting unique values in column (associative array() &amp;lt;&amp;lt; get keys). When the row count increases the Associative array() &amp;lt;&amp;lt; get keys gets slower and slower and Summarize() doesn't seem to suffer from same issue, at least not as fast. So I have tried to start using the Summarize() more (never know how tall the datatables get).&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 18:53:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381448#M63202</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-04-30T18:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381757#M63231</link>
      <description>&lt;P&gt;Interesting discussion! The data table matrix notation, which I think first appeared in JMP 13, is quite efficient for assignment.&lt;/P&gt;
&lt;P&gt;For this particular problem it's almost 500 times faster than the for loop (0,003 vs 1.5 seconds, JMP 15 Mac laptop).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;start = HP Time();
For( i = 5, i &amp;lt;= N Cols( dt ), i++,
	Try( dt[Loc( dt[0, i], 999 ), i] = . )
);
Show( HP Time() - start);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The try() is needed to avoid an error for columns without "999".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looping over columns is still necessary because direct assignment for the whole matrix, which I for a moment thought would be even faster, does not work. Error: "Multiple subscripts require single subscripts at each inner level in access or evaluation...", which on second thought makes sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// The left Data Table matrix syntax is OK on its own, but not for assignment. 
dt[0, 5 :: N Col( dt )][Loc( dt[0, 5 :: N Col( dt )], 999 )] = .;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 May 2021 17:03:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381757#M63231</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2021-05-02T17:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381766#M63232</link>
      <description>&lt;P&gt;Went maybe a bit too deep on this (but at least got some kind of an idea how to do this type of testing later if I have to).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote a some sort of testing script with different expressions to test different ways of replacing the 999 with missing. I tested with two datasets (Semiconductor Capability.jmp and Probe.jmp) and changing the amount of missing values in columns.&lt;/P&gt;&lt;P&gt;Loc() is fastest at replacing values (no surprise there). Missing Value Codes() is "always" fast but it has a bit more limited use cases when compared to Loc() and It is a bit more of a hassle to use if there would be multiple values to replace.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1619976849961.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32536i9387DE215113B3B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1619976849961.png" alt="jthi_0-1619976849961.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fastest ended up being loc_2d (didn't bother changing variable names from this: &lt;A href="https://community.jmp.com/t5/JSL-Cookbook/Using-Loc-with-a-2D-Matrix/ta-p/195207" target="_blank" rel="noopener"&gt;Using Loc With a 2D Matrix&lt;/A&gt; ). Still have to loop to get values set (at least to my knowledge), so most likely the reason for this being faster than just Loc() is that it will skip some columns. Below are expr_loc2d and expr_loc:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;expr_loc = Expr(
	for(i=5,i&amp;lt;= ncols(testData),i++,
		column(testData,i)[Loc(testData[0,i], 999)]=.;
	);
);

expr_loc_2d = Expr(
	mat = testData[0,5::NCols(testData)]; 
	nr = N Rows(mat);
	nc = N Cols(mat);
	blacklocs = Loc(mat, 999) - 1;
	rowlocs = Floor((blacklocs) / nc ) + 1;
	collocs = Mod((blacklocs), nc ) + 1 + 4;
	uniqCols = Associative Array(collocs) &amp;lt;&amp;lt; get keys; 
	For(i_2d = 1, i_2d &amp;lt;= N Items(uniqCols), i_2d++,
		testData[rowlocs[Loc(collocs, uniqCols[i_2d])], uniqCols[i_2d]] = .; 
	);
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also it seems to be important to use AsColumn(Column(dt, i)) like &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14379"&gt;@Ryan_Gilmore&lt;/a&gt; said (didn't even bother testing &amp;lt;&amp;lt;&amp;nbsp; get rows where without it, because it will be very slow), but I did test recode with and without Column(). Also just noticed that I missed one Column() from recode, so run couple of quick tests (not attached in data or script):&lt;/P&gt;&lt;P&gt;Fairly big difference between these three:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;expr_recode_ascolumn = Expr(
	For(i = 5, i &amp;lt;= N Cols(testData), i++,
		testData &amp;lt;&amp;lt; Recode Column(
			As Column(dt, i),
			{If( _rcNow == 999, ., _rcNow)},
			Target Column(As Column(testData, i))
		)
	);
);

expr_recode_ascolumn_column = Expr(
	For(i = 5, i &amp;lt;= N Cols(testData), i++,
		testData &amp;lt;&amp;lt; Recode Column(
			As Column(dt, i),
			{If( _rcNow == 999, ., _rcNow)},
			Target Column(As Column(Column(testData, i)))
		)
	);
);&lt;BR /&gt;
expr_recode_ascolumn_column_column = Expr(
	For(i = 5, i &amp;lt;= N Cols(testData), i++,
		testData &amp;lt;&amp;lt; Recode Column(
			As Column(Column(dt, i)),
			{If( _rcNow == 999, ., _rcNow)},
			Target Column(As Column(Column(testData, i)))
		)
	);
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1619979094659.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32537i45C191A7AEE66942/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1619979094659.png" alt="jthi_1-1619979094659.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The test script and some result data attached. Script will mostly likely have some mistakes here and there. Should be fairly easy to add new expressions if someone wants to do so. One thing I didn't test at all is using &amp;lt;&amp;lt; Begin/End data update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 May 2021 18:14:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/381766#M63232</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-05-02T18:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/382108#M63278</link>
      <description>&lt;P&gt;Here is a way to avoid looping, although there is overhead in creating a matrix and assigning back to the table after. This approach performs quickly on this data, about the same as the loc_2d, but as the table becomes huge, I would expect its relative performance to suffer, but I've not verified this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;expr_mat = expr(
	m = dt[0, 5 :: N Col( dt )];
	m[Loc( m, 999 )] = .;
	dt[0, 5 :: N Col( dt )] = m;
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 May 2021 03:18:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/382108#M63278</guid>
      <dc:creator>brady_brady</dc:creator>
      <dc:date>2021-05-04T03:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/382197#M63287</link>
      <description>&lt;P&gt;For the '&lt;SPAN&gt;overhead in creating a matrix' I suspect that &lt;A href="https://community.jmp.com/t5/Uncharted/Data-table-subscripting/ba-p/21013" target="_self"&gt;data table subscripting&lt;/A&gt; might help.&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;&amp;nbsp;would know.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 12:26:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/382197#M63287</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2021-05-04T12:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/382265#M63299</link>
      <description>&lt;P&gt;Yes... the hurdle is that while matrices can be accessed with a single index (which presumes row-major layout), data tables cannot. Thus, there is sadly no analog to &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;m[loc(m, 9999)] = .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where m is a pxq matrix, in the data table world... hence the lines preceding and following this one in the code above. While the code is still fast, it would be REALLY fast if single-index access were available for tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 16:38:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/382265#M63299</guid>
      <dc:creator>brady_brady</dc:creator>
      <dc:date>2021-05-04T16:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/382395#M63304</link>
      <description>&lt;P&gt;You've got the comparison a bit wrong here -- the "Get Rows Where" functionality will evaluate it's expression on each row, thus you need to minimize any superfluous lookups before running the loop -- in particular, your iterator is external and it will have to do some scope walking to find it on each row.&amp;nbsp; Also, it will evaluate the AsColumn function on each row, looking up both 'dt' and 'i' each time.&amp;nbsp; This is _very_ expensive.&amp;nbsp; The proper way to to this would be as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=current data table();
start=hptime();
names = dt &amp;lt;&amp;lt; Get Column Names( "string" );
for(i=5,i&amp;lt;= ncols(dt),i++,
	Eval( Parse( Eval InserT( JSL Quote(
	column(dt,i)[dt&amp;lt;&amp;lt;get rows where(:name("^names[i]^")==999)]=.;
	) ) ) );
);
show((hptime()-start)/1000000);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You will notice that this executes on the order of 3000x faster, which should put it comparable to if not better than the other methods you have&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 00:17:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/382395#M63304</guid>
      <dc:creator>ErraticAttack</dc:creator>
      <dc:date>2021-05-05T00:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/382496#M63312</link>
      <description>&lt;P&gt;Yes, I understand&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3552"&gt;@brady_brady&lt;/a&gt;&amp;nbsp;. One could do this, however:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

// Make an example table with some rogue '999' values
nr = 10;		// Number of rows
nc = 10;		// Number of columns
p = 0.1;		// Fraction of rogue values
val = 999;		// Rogue value
m = J(nr, nc, RandomInteger(1, 10));
m = Shape(m, nr*nc, 1);
m[RandomIndex(nr*nc, Floor(nr*nc*p))] = val;
m = Shape(m, nr, nc);
dt = AsTable(m);
dt &amp;lt;&amp;lt; setName("Rogue Values");
Wait(3);

// Set rogue values to '.'
mask = J(nr*nc, 1, 1);
mask[Loc(dt[0,0] == val)] = .;		
mask = Shape(mask, nr, nc);
dt[0,0] = mask :* dt[0,0];&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;But I very much doubt this would be quicker than what you already have, not least because of the element wise multiplication.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 09:13:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/382496#M63312</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2021-05-06T09:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/579844#M78711</link>
      <description>&lt;P&gt;Ah, I didn't know:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;:name()&lt;/STRONG&gt; acts like &lt;STRONG&gt;As Column()&lt;/STRONG&gt;?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not so clear from the Scripting index :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, with&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Substitute &lt;/STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;and&lt;/FONT&gt; &lt;STRONG&gt;As column()&lt;/STRONG&gt; &lt;/FONT&gt;instead of &lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Eval(Parse(Eval Insert(JSL Quote(name("^names[i]^")&lt;/STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;it is:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;start=hptime();
for(i=5,i&amp;lt;= ncols(dt),i++,
	Eval(Substitute(Expr(column(dt,i)[dt&amp;lt;&amp;lt;get rows where(__col__==999)]=.),
			Expr(__col__),
			Name Expr(As Column(dt, i))));
);
show((hptime()-start)/1000000)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And after&amp;nbsp;&lt;A href="https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/578576#M78599" target="_blank"&gt;this surprising finding&lt;/A&gt;&amp;nbsp;I am almost&amp;nbsp;surprised here that the &lt;STRONG&gt;get rows where&lt;/STRONG&gt; is also fast if the number comparison is replaced by a character comparison :)&lt;/img&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;start=hptime();
for(i=5,i&amp;lt;= ncols(dt),i++,
	Eval(Substitute(Expr(column(dt,i)[dt&amp;lt;&amp;lt;get rows where(char(__col__)=="999")]=.),
			Expr(__col__),
			Name Expr(As Column(dt, i))));
	if(mod(i,10)==0,show(i));
);
show((hptime()-start)/1000000)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 19:14:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/579844#M78711</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2022-12-10T19:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/579845#M78712</link>
      <description>&lt;P&gt;This has been such a fun and informative discussion to follow! Brilliant answers. I am truly not qualified to add anything of value here so I'm going to resort to "cheating."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The OP question was about replacing values of 999 in the data with missing because the 999 are missing value codes and we wouldn't want those included in calculations. It's not at all in the spirit of this very interesting line of questioning, but my contribution is that exploiting the missing value code column property is faster than doing any replacement on the data and achieves the same thing for *most* purposes &amp;nbsp;:)&lt;/img&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;start = HP Time();
For( i = 5, i &amp;lt;= N Cols( dt ), i++,
	Column(dt,i) &amp;lt;&amp;lt; Set Property( "Missing Value Codes", {999} )
);
Show( HP Time() - start);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;~&amp;nbsp;0.007 seconds on my m1 mac.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 22:15:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/579845#M78712</guid>
      <dc:creator>jules</dc:creator>
      <dc:date>2022-12-10T22:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/579919#M78714</link>
      <description>&lt;P&gt;Wow, what a wonderful trick :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feared that problems with &lt;STRONG&gt;Missing Value Code&lt;/STRONG&gt; will start as soon as you try:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Maximum(:NPN3)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;[As we know that&amp;nbsp;&lt;STRONG&gt;excluded&lt;/STRONG&gt; rows have to be &lt;EM&gt;excluded&lt;/EM&gt;&amp;nbsp;in Col aggregation by hand (or better: by &lt;STRONG&gt;GroupBy&lt;/STRONG&gt; argument).]&lt;/P&gt;&lt;P&gt;But the surprise:&lt;STRONG&gt; Col&lt;/STRONG&gt; aggregations respect &lt;STRONG&gt;Missing Value Codes&lt;/STRONG&gt; :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be picky: the &lt;EM&gt;OP question&lt;/EM&gt; of the original post was quite implicit:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT size="3" color="#000000"&gt;And from the results, the &lt;FONT face="courier new,courier"&gt;Get Rows Where&lt;/FONT&gt; should be used sparingly.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3" color="#000000"&gt;Comments and corrections are welcomed......&lt;/FONT&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;translated - with an uneasy feeling in my belly - as:&lt;/FONT&gt;&lt;/FONT&gt;&lt;EM&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt; "why on earth?!?"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Thanks to &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26363"&gt;@ErraticAttack&lt;/a&gt;&amp;nbsp;for solving the puzzle :)&lt;/img&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2022 08:04:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/579919#M78714</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2022-12-11T08:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/579979#M78723</link>
      <description>&lt;P&gt;thank you &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;could you please estimate the effect of using invisible and private tables on the different methods? they must be the fastest way to amend any script for boosting performance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2022 19:32:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/579979#M78723</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2022-12-11T19:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Should you Loop through a data table or use Recode, or use Get Rows Where to change values in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/580081#M78728</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/958"&gt;@ron_horne&lt;/a&gt;&amp;nbsp;, the problem is with the &lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;get rows where&lt;/STRONG&gt;&lt;/FONT&gt;, so speed should be/ is independent of such settings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the other hand, it makes a huge difference if the column index is explicit&amp;nbsp;or if it's a variable (even if the variable has an assigned value).&lt;/P&gt;&lt;P&gt;This was not clear to me - how good that I found this conversation!&lt;BR /&gt;&lt;BR /&gt;I don't know how many jsl codes out there could be faster by a factor of ~ N(rows of data table)&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;Can the issue be fixed&amp;nbsp; by what goes on in the background of JSL?&lt;/P&gt;&lt;P&gt;Or is there a fundamental something in the JSL architecture which specifies that such a behavior is intended and cannot be changed?&lt;/P&gt;&lt;P&gt;If so: a warning message could help coders not to be trapped by this issue ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

For( k = 1, k &amp;lt;= 4, k++,
	dt &amp;lt;&amp;lt; Concatenate( dt, dt, dt, Append to first table )
);

nuke = Function( {},
	For( k = 1, k &amp;lt;= 10, k++,
		Column( dt, 5 )[Random Integer( 1, 1455 )] = 999
	)
);

//dt &amp;lt;&amp;lt; show window(0);
//dt&amp;lt;&amp;lt; Begin Data Update();

nuke();

start = HP Time();
i = 5;
dt &amp;lt;&amp;lt; get rows where( As Column( dt, i ) == 999 );
Show( (HP Time() - start) / 1000000 );

nuke();

start = HP Time();
dt &amp;lt;&amp;lt; get rows where( As Column( dt, 5 ) == 999 );
Show( (HP Time() - start) / 1000000 );


//dt &amp;lt;&amp;lt; End Data Update();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 22:16:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Should-you-Loop-through-a-data-table-or-use-Recode-or-use-Get/m-p/580081#M78728</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2022-12-12T22:16:35Z</dc:date>
    </item>
  </channel>
</rss>

