Re: MUCH FASTER int_to_bytes, bytes_to_int, and allocate_string

new topic     » goto parent     » topic index » view thread      » older message » newer message

Aku writes:
> These functions is Copyright (c) 2001 Ting (alias Aku). You
> may use this functions freely (especially for win32 API
> structures).

> ppi = allocate(4)
>
> global function int_to_bytes2(object x)
>    poke4(ppi, x)
>    return peek({ppi,4})
> end function

Thanks for the benchmark results.

Essentially the same performance trick has been in 
database.e for more than a year now:

mem = allocate(4)

procedure put4(atom x)
-- write 4 bytes to current database file
-- x is 32-bits max
    poke4(mem, x) -- faster than doing divides etc.
    puts(current_db, peek({mem, 4}))
end procedure

I accept that you can copyright the 
specific routines and benchmarks that you just posted.

I don't accept that you can restrict the use of this trick
by myself or anyone else.  I may eventually rewrite
int_to_bytes() and similar routines using this method.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu