Subscribe

2017-05-26 Thread Karl-Heinz Kreis
Hello Karl-Heinz Kreis  :-)
You are now subscribed



-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Fixed-point scaling and lookup tables

2017-05-26 Thread Lindsay John Lawrence
>
> For a much faster solution than the idx mechanism, look at this:
> http://www.mail-archive.com/picolisp@software-lab.de/msg05199.html
>
> This is a very interesting idea. Thanks for pointing it out. Is there a
formal name for the algorithm?
For some more general purpose data structures I am working with, it may be
a great solution.

I'll compare it to what I was in the process of doing, which was to have an
'idx something to the effect of (N, nth L N).

However, for the numerical table lookups, if I am going to a shared lib, I
might as well do the ~O(1) lookup in a static array.

/Lindsay


Re: Fixed-point scaling and lookup tables

2017-05-26 Thread Enrique Sánchez
For a much faster solution than the idx mechanism, look at this:

http://www.mail-archive.com/picolisp@software-lab.de/msg05199.html

It would be nice if Picolisp had this generic fastNth function,
in order to solve this kind of lookup accesses.

Enrique.


Re: Fixed-point scaling and lookup tables

2017-05-26 Thread Alexander Burger
Hi Lindsay,

> implementation; from the performance benefit point of view. At least for
> the two tables I cared most about.. multiplication and division. An idx,
> while impressively fast, comes nowhere near native multiplication.

True


> In the meantime I thought I would share the code below for any thoughts or
> observations... demonstrates multiplication by table lookup and addition.

Thanks for sharing so far! Looks good :)

♪♫ Alex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe