commit 1b1a7a8beb2045cea6ad640aeab3b12b5cf0342d parent 6799807d0094834ab6458b62def23cb5790016a4 Author: Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> Date: Mon, 7 Sep 2015 15:30:01 +0200 Code only: minor optimization for type-of. Diffstat:
M | srfi/123.body.scm | | | 13 | +++++++++---- |
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/srfi/123.body.scm b/srfi/123.body.scm @@ -237,13 +237,18 @@ (list hashtable?)) (define type-list + ;; Although the whole SRFI intrinsically neglects performance, we still use + ;; the micro-optimization of ordering this list roughly according to most + ;; likely match. (append - (list boolean? bytevector? char? eof-object? hashtable? null? number? pair? - port? procedure? string? symbol? vector?) + (list hashtable? vector? pair? bytevector? string?) srfi-4-types box-types - ;; Place records last so specific record types (e.g. box) take precedence. - record-types)) + ;; The record type must be placed last so specific record types (e.g. box) + ;; take precedence. + record-types + ;; Place those types we don't support really last. + (list boolean? char? eof-object? null? number? port? procedure? symbol?))) (define (register-getter-with-setter! type getter sparse?) (push! type-list type)