1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

fix testing code in web/server

* module/web/server.scm (call-with-encoded-output-string): Fix some code
  I accidentally left in while testing. Re-tested the difference in
  speed; pleasantly surprised.

* module/web/uri.scm: Make the same change here.
This commit is contained in:
Andy Wingo 2010-12-12 23:33:33 +01:00
parent a6b1b27aad
commit 998191fd4f
2 changed files with 3 additions and 5 deletions

View file

@ -152,9 +152,9 @@
(values #f #f #f))))
(define (call-with-encoded-output-string charset proc)
(if (and (string-ci=? charset "utf-8") #f)
(if (string-ci=? charset "utf-8")
;; I don't know why, but this appears to be faster; at least for
;; examples/debug-sxml.scm (650 reqs/s versus 510 reqs/s).
;; examples/debug-sxml.scm (1464 reqs/s versus 850 reqs/s).
(string->utf8 (call-with-output-string proc))
(call-with-values
(lambda ()

View file

@ -218,9 +218,7 @@
(define (call-with-encoded-output-string charset proc)
(if (and (string-ci=? charset "utf-8") #f)
;; I don't know why, but this appears to be faster; at least for
;; examples/debug-sxml.scm (650 reqs/s versus 510 reqs/s).
(if (string-ci=? charset "utf-8")
(string->utf8 (call-with-output-string proc))
(call-with-values
(lambda ()