Created
December 17, 2019 04:09
-
-
Save samdphillips/92dd56e1fc78884230dbc59aabf6f1c0 to your computer and use it in GitHub Desktop.
Some benchmark scripts for Rebellion transducers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require rebellion/streaming/reducer | |
rebellion/streaming/transducer) | |
(time (transduce (in-range 1000000) | |
#:into (into-for-each void))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require rebellion/streaming/reducer | |
rebellion/streaming/transducer) | |
(time (transduce (in-range 1000000) | |
(mapping values) | |
(mapping values) | |
(mapping values) | |
(mapping values) | |
(mapping values) | |
#:into (into-for-each void))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require rebellion/collection/list | |
rebellion/streaming/transducer) | |
(define v (build-vector 1000000 values)) | |
(time (void (transduce (in-vector v) #:into into-list))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment