[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (declare (type fixnum ---)) considered etc.
In article <8607241621.AA03430@hplsny> snyder%hplsny@hplabs.HP.COM (Alan Snyder) writes:
>I think the PL/I experience shows
>that if you force people to declare the number of bits of
>precision they want, in most cases they will find out what number
>produces the best results on their current machine and use that,
>thus making their programs non-portable in terms of efficiency.
This is a red herring. Almost everything in CL is going to vary
in efficiency between implementations. Consider FUNCALL - some impls
do it almost as well as a direct call, while others cons up a list
of arguments and feed to APPLY. This has a direct bearing on the
efficiency of using things like MEMBER's keyword arguments. Consider
generic sequence functions, whose allowed variation is notorious;
DELETE is not even required to be destructive! Consider arrays, which
can be specialized in a dozen ways, or not at all.
As a language, Common Lisp can promise consistent efficiency or consistent
behavior - and I prefer the latter. It might be possible to promise both in
a high-level language, but nobody's succeeded yet...
stan