1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

add inline macros for zero? and 1-

* module/system/il/inline.scm (zero?, 1-): New inlines. Neat :) The loop
  benchmark speedup is now up to 5x.
This commit is contained in:
Andy Wingo 2008-05-25 13:38:17 +02:00
parent e677365cbc
commit 6cc3f99e83

View file

@ -110,6 +110,9 @@
(define-inline >= (x y)
(ge? x y))
(define-inline zero? (x)
(ee? x 0))
(define-inline +
() 0
(x) x
@ -127,6 +130,9 @@
(x y) (sub x y)
(x y . rest) (sub x (+ y . rest)))
(define-inline 1-
(x) (sub x 1))
(define-inline /
(x) (div 1 x)
(x y) (div x y)