BTW what will be the timing to split a string of 1Mln+1 bytes? This last benchmark doesn't correlate well with the preceding ones.
In the last example, the primary dimension is only 1001 elements and was pre-built unsing SPLITA. This was unneeded as the FOR/NEXT could build the index on the fly and add the
b mixed array once the element was created to proved the second dimension.
b[0] = 0
b[1] = 1.23
b[2] = "ABC"
FOR x = 0 to 1000
a[x] = b
NEXT
PRINT UBOUND(a),"\n"
PRINT UBOUND(a[500]),"\n"
PRINT a[10,0],"\n"
PRINT FORMAT("%g",a[100,1]),"\n"
PRINT a[1000,2],"\n"
jrs@laptop:~/sb/sb22/sblisp$ time scriba dim.sb
1000
2
0
1.23
ABC
real 0m0.011s
user 0m0.008s
sys 0m0.004s
jrs@laptop:~/sb/sb22/sblisp$
Here is the same code with the SPLITA used to per-inialize the
a array.
jrs@laptop:~/sb/sb22/sblisp$ time scriba dim.sb
1000
2
0
1.23
ABC
real 0m0.007s
user 0m0.000s
sys 0m0.004s
jrs@laptop:~/sb/sb22/sblisp$