[luatex] fio library byte order

Hans Hagen j.hagen at xs4all.nl
Mon Jun 29 20:32:23 CEST 2020

On 6/29/2020 7:45 PM, Reinhard Kotucha wrote:

> 96MiB per file.  Processing means to apply a lookup table and a 3×3
> color matrix, quite inexpensive operations.  What takes most of the
> time is to extract single bytes with string.sub() and to convert them
> to integers.  Finally I have to convert everything back to uint16.
last mail as it's way off topic ...

loading 96 MB string and converting 2 bytes to an unsigned: 1.7 sec
idem plus a lookup                                        : 2.1 sec
idem but then also going back string with 2 byte unsigned : 5.0 sec

add a few sec for some calculations in between, so still doable in lua 
(half that time when using luajit)

(measured on my 8 year old laptop so on a modern machine maybe less than 
half the mentioned time which is okay compared to some pure c approach i 


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl

More information about the luatex mailing list.