efficiency of various equivalent tests

Jay R. Ashworth jra at baylink.com
Mon Jul 7 13:50:00 PDT 2008


On Mon, Jul 07, 2008 at 04:47:41PM -0400, Brian K. White wrote:
> Which way causes fp to do less, or faster, work at run-time?
> 
> "and list"
> A) If: aa eq "" and bb eq "" and cc eq ""
> B) If: aa{bb{cc{"" eq ""
> 
> "or list"
> A) If: aa eq "" or bb eq "" or cc eq ""
> B) If: "|"{aa{"|"{bb{"|"{cc{"|" co "||"

Write a loop that shows the start time, does that 100,000 times, and
then shows the end time.  Run twice.  :-)

PS: It was one year ago, today.

Cheers,
-- jra
-- 
Jay R. Ashworth                   Baylink                      jra at baylink.com
Designer                     The Things I Think                       RFC 2100
Ashworth & Associates     http://baylink.pitas.com                     '87 e24
St Petersburg FL USA      http://photo.imageinc.us             +1 727 647 1274

	     Those who cast the vote decide nothing.
	     Those who count the vote decide everything.
	       -- (Joseph Stalin)


More information about the Filepro-list mailing list