Martin Rubey wrote:
>
> Martin Rubey <[EMAIL PROTECTED]> writes:
>
> > Maybe it would make sense to compare speed with the definition taken from
> > URAGG. Well, no, I think it's best to fix this and move ahead. I add an
> > issue on MathAction, so we can fix it.
>
> Sorry: NO, we should compare with the speed of LENGTH$Lisp.
>
Concerning speed: using byte-code interpreter like Clisp or CCL the
main difference is if function is in kernel (AFAIK LENGTH in CCL
was implemented by C code) or is byte-code coded. When using
real compiler on long list using "two pointers" method
for checking adds about 50% more reads, so LIST-LENGTH is
expected to take 150% time of non-checking LENGTH. Tricks
with delayed checking (like in URAGG) can significantly
reduce this for short lists (probably to few percents
overhead). My gut feeling is that if we really want
checking then cost is acceptable.
OTOH looping on cyclic lists is just one of may ways of
writing infinite loop. Also, typical code only creates
normal lists and cyclic list require care in
other algoriths. So I am not sure if we really want
this check -- it is probably more propaganda then
real help.
--
Waldek Hebisch
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---