guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JIT compilation with callbacks into Scheme


From: Amirouche Boubekki
Subject: Re: JIT compilation with callbacks into Scheme
Date: Fri, 21 Oct 2016 12:32:30 +0200
User-agent: Roundcube Webmail/1.1.2

Héllo Jan!

On 2016-10-20 22:14, Jan Wedekind wrote:
Hi,
  I managed to implement JIT compilation of method calls into the
Guile interpreter (AIscm 0.8.2 [1]):

    (use-modules (oop goops) (aiscm sequence) (aiscm obj) (aiscm jit))
    (<< 1 (* 10 (seq <obj> 1 2 4 8)))
    ;#<sequence<obj>>:
    ;(1024 1048576 1099511627776 1208925819614629174706176)

  Types can also be composed using Scheme objects:

    (use-modules (oop goops) (aiscm sequence) (aiscm obj) (aiscm
complex) (aiscm jit))
    (* (seq (complex <obj>) 1+2i 3+4i) 5)
    ;#<sequence<complex<obj>>>:
    ;(5.0+10.0i 15.0+20.0i)

  In the same way native types can be composed:

    (use-modules (oop goops) (aiscm sequence) (aiscm rgb) (aiscm int)
(aiscm jit))
    (make (multiarray (rgb (integer 8 unsigned)) 2) #:shape '(3 2))
    ;#<sequence<sequence<rgb<int<8,unsigned>>>>>:
    ;(((rgb 160 85 191) (rgb 10 0 0) (rgb 0 0 0))
    ; ((rgb 0 0 0) (rgb 0 0 0) (rgb 0 0 0)))

Let me know if you have any suggestions or comments.

Regards
Jan

[1] http://wedesoft.github.io/aiscm/

How does this compare with numpy?

TIA!

--
Amirouche ~ amz3 ~ http://www.hyperdev.fr



reply via email to

[Prev in Thread] Current Thread [Next in Thread]