micro-optimizations to string-trim-both, and to (web http)
authorAndy Wingo <wingo@pobox.com>
Wed, 7 Mar 2012 11:39:30 +0000 (12:39 +0100)
committerAndy Wingo <wingo@pobox.com>
Thu, 22 Mar 2012 08:55:28 +0000 (09:55 +0100)
commit47153f29b02cee6324aec523cfa44b48e1cb29b9
treed825abdb24c489204f96a2999ef782c73007d49f
parentc05805a4ea764dec5a0559edefcdfb9761191d07
micro-optimizations to string-trim-both, and to (web http)

* libguile/srfi-13.c (scm_string_trim, scm_string_trim_right)
  (scm_string_trim_both): Take the whitespace fast-path if the char_pred
  is scm_char_set_whitespace.

* module/web/http.scm (read-header, split-and-trim, parse-quality-list):
  (parse-param-component, parse-credentials, "Content-Type"):
  (read-request-line, read-response-line): Use char-set:whitespace
  instead of char-whitespace?.  It avoids recursing into the VM.
libguile/srfi-13.c
module/web/http.scm