[EMAIL PROTECTED] wrote:
> 
> > I am curious when (against which build) did you do your benchmarks and
> > what sort of workload they consistent of?
> 
> Or even what sort of workload they consisted of. :-)

Shuffeling large data round within the shell (e.g. don't think about
pipes and streaming data... think about huge arrays or trees with lots
of strings inside). ksh93 has several special datatypes including things
like associative arrays which can quicky how to very large sizes (both
the number of array elements and the size of the data values) - ksh93 in
OS/Net ships a 64bit version for such cases...
And even for very small amounts data (e.g. if you increase the number of
array elements the difference between 64k and 8k pages will even be much
larger (however I cannot benchmark this reliably at home because larger
datasets will force this xxx@@!!!-Ultra5 into swapping)) you see good
improvements, for example
-- snip --
#!/usr/bin/ksh93

integer i j

integer -r numelements=100 # const number of elements

# create large string
s="largestring"
for((i=0 ; i < 10 ; i++ )) ; do
    s+="${s}"
done

# create array and fill it
typeset -a sa
for((i=0 ; i < numelements ; i++)) ; do
    sa[i]="${s}${i}"
done

# count chars
integer len=0

for((j=0 ; j < 1000 ; j++ )) do
    for((i=0 ; i < numelements ; i++)) ; do
        tmp1="_${sa[i]}_" # copy1
        tmp2="a${tmp1}a"  # copy2
        len+=${#tmp2}
    done
done
# EOF.
-- snip --

Running this test case on my Ultra5 results in the following values
(I've ran this 25 times, the benchmark run with 64k pages is always
faster than the run with plain 8k pages. Note that this was done using a
plain ast-ksh.2007-03-18 build on B48 and predates some further changes,
doesn't make use of any "stack uses largepages"-optimized codepaths in
libcmd (e.g. no builtins from libcmd are used in the example above) or
other modifications done for the ksh93 in OS/Net):
-- snip --
$ (LC_ALL=C timex ppgsz -o heap=65536,stack=65536,anon=65536 ksh93
linearfillandcountchars.ksh)

real       1:34.48
user       1:33.53
sys           0.11

$ (LC_ALL=C timex ppgsz -o heap=8192,stack=8192,anon=8192 ksh93
linearfillandcountchars.ksh)

real       1:39.04
user       1:38.06
sys           0.12
-- snip --

Or short: Even for this small testcase with a small dataset we get a ~~5
second difference....

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [EMAIL PROTECTED]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to