Implementation of And (dot) NotEqual

General discussions related to APLNext's VisualAPL.

Moderators: Tech Support, phpbb_admin

Implementation of And (dot) NotEqual

Postby Chris McIntosh » August 5th, 2011, 4:10 pm

This is a different issue than APL and strongly typed variables, so I thought I'd post it in a different thread.

I have a VisualAPL non-strongly typed variable of type {cvar} which contains integers. It's shape i s28069 x 15. Missing is untyped and is created with the statement: Missing â†
Chris McIntosh

Results identical, but algorithm not identical

Postby joe_blaze » August 5th, 2011, 5:34 pm

The expected results should be identical, but the underlying algorithms are not necessarily the same. Time variations for two algorithms can occur depending on the APL implementation.

None-the-less, I found that the processing time for both operations totalled 16ms on my Sony netbook. See the attachment below for the screen capture.

Please see if you can repeat your results.
(141.62 KiB) Downloaded 245 times
Posts: 382
Joined: February 11th, 2007, 3:09 am
Location: Box 361 Brielle, NJ 08730-0361

Postby Chris McIntosh » August 10th, 2011, 6:50 pm

Hi, Joe,

My results are repeatable in a .apl project file included in a Visual Studio solution.

I noticed your example was done in Cielo Explorer, so just for fun I thought I'd try the ∧.≠ expression, using identical data, in Cielo Explorer.

In my .apl project file, I wrote my data to a VisualAPL component file. I then read this data into Cielo Explorer from that component file.

When I executed the ∧.≠ expression, I got very similar results that you did - code executed in 107 milliseconds.

Is it possible that different code is getting executed in a .apl project file than in Cielo Explorer? Is it possible that writing/reading data somehow changes it?

In Cielo Explorer, ⎕dr of data is 323, while GetType() is a cvar. In the .apl project file, ⎕dr of data is also 323, and GetType() is also a cvar.

Chris McIntosh

Postby Chris McIntosh » August 10th, 2011, 7:19 pm

Hi, Joe,

I now have more of a handle on this strangeness.

To see if writing/reading data might affect results, I changed my .apl project code to read in from the VisualAPL component file and do the ∧.≠ When I did this, it performed very quickly, leading me to believe writing/reading data might be changing it.

To be sure, in my .apl file I executed what I thought was original code, but I could not replicate slowness again.

However, I realized I had in fact added two lines, which was greatly affecting performance.

Here is the entire code for this method:

public static float[,] CalcAndAddResults(int[,] inputData)
// Declare and initialize variables.
Chris McIntosh

Run times different if []dr and GetType() used

Postby joe_blaze » August 16th, 2011, 12:58 am

Hi Chris,

Using the VisualAPL Cielo Explorer script to simulate your report I found that the run times were the same (about 100ms or less) with and without the []dr and GetType() statements included in the script.

Possibly the script I wrote is not sufficiently like the calculations and data you are running?

I am investigating the red underlinings in the script, which did not affect the running of it.
Script Include Or Exclude DR and GetType.pdf
(187.1 KiB) Downloaded 243 times
Posts: 382
Joined: February 11th, 2007, 3:09 am
Location: Box 361 Brielle, NJ 08730-0361

Return to VisualAPL

Who is online

Users browsing this forum: No registered users and 1 guest