Skip to content

Instantly share code, notes, and snippets.

@samdphillips
Created December 17, 2019 04:09
Show Gist options
  • Save samdphillips/92dd56e1fc78884230dbc59aabf6f1c0 to your computer and use it in GitHub Desktop.
Save samdphillips/92dd56e1fc78884230dbc59aabf6f1c0 to your computer and use it in GitHub Desktop.
Some benchmark scripts for Rebellion transducers
#lang racket/base
(require rebellion/streaming/reducer
rebellion/streaming/transducer)
(time (transduce (in-range 1000000)
#:into (into-for-each void)))
#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)))
#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