On Fri, 2004-04-09 at 12:04, Kostas Oikonomou wrote:
> Hi, I just ran this simple code with the Unicon and Icon systems on a Sun
> Solaris 9 machine:
>
> # Timing test: Unicon vs. Icon
> procedure main()
> local L, L2, x
> L := []
> every 1 to 100000 do put(L, ?0)
> L2 := []
> every x := !L do put(L2, x^2)
> end
>
>
> The results of the "time" command were surprising:
>
> Icon:
>
> real 0m0.304s
> user 0m0.280s
> sys 0m0.020s
>
> Unicon:
>
> real 0m0.606s
> user 0m0.560s
> sys 0m0.040s
>
>
> So Icon appears to be twice as fast as Unicon!
Hmmm, interesting. I made a slight mod:
# Timing test: Unicon vs.
Icon
procedure main()
local L, L2, x
t1 := &time
L := []
every 1 to 100000 do put(L, ?0)
L2 := []
every x := !L do put(L2, x^2)
t2 := &time
write("time: ",t2-t1)
end
And ran it under Linux (Redhat 9):
Icon:
time: 120
baz 0.12s user 0.01s system 97% cpu 0.133 total
Unicon:
time: 120
baz 0.13s user 0.01s system 104% cpu 0.133 total
Which seems to indicate that they are comparable speed!
(Which is what I'd expect, they should be producing
nearly identical ucode...)
Wonder what's special about the Sun machine? Might different
compilers have been used to build the two?
--
Steve Wampler -- [EMAIL PROTECTED]
The gods that smiled on your birth are now laughing out loud.
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group