summaryrefslogtreecommitdiff
path: root/benchmark-suite
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-04-02 11:50:46 +0200
committerAndy Wingo <wingo@pobox.com>2016-04-04 16:30:56 +0200
commit59a18451b8bc70fe9cb9b9f41e61bbfa9e0e86be (patch)
treee4665183a3a144d60bb563e0f61260ff94393c1a /benchmark-suite
parent0a0a8d819db685e240f0a27404ffd167654b7f85 (diff)
Use symbols instead of _IONBF values as args to setvbuf
* libguile/ports.c (scm_setvbuf): Use the symbols `none', `line', and `block' instead of the values `_IONBF', `_IOLBF', and `_IOFBF'. * NEWS: Update. * doc/ref/posix.texi (Ports and File Descriptors): Update setvbuf documentation. * module/ice-9/deprecated.scm (define-deprecated): New helper. (_IONBF, _IOLBF, _IOFBF): Define deprecated values. * benchmark-suite/benchmarks/read.bm ("read"): * benchmark-suite/benchmarks/uniform-vector-read.bm ("uniform-vector-read!"): * libguile/r6rs-ports.c (cbip_fill_input): * module/system/base/types.scm (%ffi-memory-backend): * module/web/client.scm (open-socket-for-uri): * module/web/server/http.scm (http-read): * test-suite/tests/ports.test ("pipe, fdopen, and line buffering"): ("setvbuf"): * test-suite/tests/r6rs-ports.test ("7.2.7 Input Ports"): Update to use non-deprecated interfaces.
Diffstat (limited to 'benchmark-suite')
-rw-r--r--benchmark-suite/benchmarks/read.bm20
-rw-r--r--benchmark-suite/benchmarks/uniform-vector-read.bm2
2 files changed, 11 insertions, 11 deletions
diff --git a/benchmark-suite/benchmarks/read.bm b/benchmark-suite/benchmarks/read.bm
index f0b25f541..a4ff9936f 100644
--- a/benchmark-suite/benchmarks/read.bm
+++ b/benchmark-suite/benchmarks/read.bm
@@ -51,20 +51,20 @@
(with-benchmark-prefix "read"
- (benchmark "_IONBF" 5 ;; this one is very slow
- (exercise-read (list _IONBF)))
+ (benchmark "'none" 5 ;; this one is very slow
+ (exercise-read (list 'none)))
- (benchmark "_IOLBF" 10
- (exercise-read (list _IOLBF)))
+ (benchmark "'line" 10
+ (exercise-read (list 'line)))
- (benchmark "_IOFBF 4096" 10
- (exercise-read (list _IOFBF 4096)))
+ (benchmark "'block 4096" 10
+ (exercise-read (list 'block 4096)))
- (benchmark "_IOFBF 8192" 10
- (exercise-read (list _IOFBF 8192)))
+ (benchmark "'block 8192" 10
+ (exercise-read (list 'block 8192)))
- (benchmark "_IOFBF 16384" 10
- (exercise-read (list _IOFBF 16384)))
+ (benchmark "'block 16384" 10
+ (exercise-read (list 'block 16384)))
(benchmark "small strings" 100000
(call-with-input-string small read))
diff --git a/benchmark-suite/benchmarks/uniform-vector-read.bm b/benchmark-suite/benchmarks/uniform-vector-read.bm
index 8cda82457..01b747836 100644
--- a/benchmark-suite/benchmarks/uniform-vector-read.bm
+++ b/benchmark-suite/benchmarks/uniform-vector-read.bm
@@ -43,7 +43,7 @@
(benchmark "uniform-vector-read!" 20000
(let ((input (open-input-file file-name)))
- (setvbuf input _IONBF)
+ (setvbuf input 'none)
(uniform-vector-read! buf input)
(close input)))