Split followed by Transpose

Dar Scott dsc at swcp.com
Tue Mar 23 16:21:50 EST 2004


On Tuesday, March 23, 2004, at 02:01 PM, Glen Bojsza wrote:

> But you have given me a side project to investigate and that would be 
> seeing if an array/matrix/math external would
>
> 1. give any substantial performance over a transcript solution (my 
> first thoughts would be yes)

Currently, only strings are passed to externals; presumably values in 
internal number form are stringafied through numberFormat.  (I haven't 
test whether numberFormat is used.)  Arrays might offer some 
possibilities.

On my Mac arithmetic takes under a microsecond, but a call to an 
external takes 25 to 35 microseconds.  An 'if' or 'repeat' is expensive 
in Revolution.

So, an external might do little things, but the value will be in big 
things.  For my math daydreams I have outlined an RPN calculator to 
keep values in the external and avoid passing data back and forth and 
to do multiple operations in one call.  This is mostly for variable 
precision decimal with interval arithmetic and possibly complex or 
trivial vectors.

> 2. the amount of work in defining, sourcing and creating the external

On thing that can help is pointing to something else.  Another approach 
is to mock up in Transcript.  That will also allow you to introduce 
some platforms on externals at different times.

> If anyone has ideas of what should be put into such an external please 
> contact me off the list.

This is cool!

If you also do variable precision arithmetic or interval arithmetic, 
then I don't have to do those.  If you don't, then we might want to see 
what it takes to be compatible.

Dar Scott



More information about the use-livecode mailing list