Racket Normal/  CPS Streams Competitive Benchmarks
1 General Information
1.1 Profile:   rigorous
1.2 System Information
2 Summary Results
3 Detailed Results
3.1 just-range
3.2 just-map
3.3 just-filter
3.4 just-foldl
3.5 range-filter-map
3.6 range-map-take
3.7 filter-map-foldl
3.8 range-filter-map-foldl
3.9 long-functional-pipeline
8.16

Racket Normal/CPS Streams Competitive Benchmarks🔗

1 General Information🔗

Date and time: Thu Jun 18 19:35:38-0700 2026

1.1 Profile: rigorous🔗

Logarithmic/Linear Boundary: 10000
Number of measurements for each input length: 100
Garbage collection: always

1.2 System Information🔗

Racket Version: 8.16 - Welcome to Racket v8.16 [cs].
Qi Version: 5.0
Operating System: macosx
Architecture: x86_64
Runtime: chez-scheme
Machine: Darwin visitor-10-59-50-162.wifi.berkeley.edu 21.6.0 Darwin Kernel Version 21.6.0: Sun Dec 17 22:55:27 PST 2023; root:xnu-8020.240.18.706.2~1/RELEASE_X86_64 x86_64
Processor Count: 4
Processor: Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz

2 Summary Results🔗

Benchmark

Core Streams/Pacman

just-range

1.058144

just-map

0.996468

just-filter

1.049500

just-foldl

0.972066

range-filter-map

2.783278

range-map-take

3.427580

filter-map-foldl

1.472608

range-filter-map-foldl

2.294361

long-functional-pipeline

1.408147

3 Detailed Results🔗

Benchmarks took 70097.8 seconds (19:28:17).

Measured lengths: (10 20 30 40 50 60 70 80 90 100 200 300 400 500 600 700 800 900 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000 110000 120000 130000 140000 150000 160000 170000 180000 190000 200000 210000 220000 230000 240000 250000 260000 270000 280000 290000 300000 310000 320000 330000 340000 350000 360000 370000 380000 390000 400000 410000 420000 430000 440000 450000 460000 470000 480000 490000 500000 510000 520000 530000 540000 550000 560000 570000 580000 590000 600000 610000 620000 630000 640000 650000 660000 670000 680000 690000 700000 710000 720000 730000 740000 750000 760000 770000 780000 790000 800000 810000 820000 830000 840000 850000 860000 870000 880000 890000 900000 910000 920000 930000 940000 950000 960000 970000 980000 990000 1000000)

3.1 just-range🔗

Benchmark took 6982.8 seconds (1:56:22).
Core Streams:
(λ (high)
  (cs:stream→list
   (cs:range 0 high 1)))
Pacman:
(λ (high)
  (cps:stream→list
   (cps:range 0 high 1)))
\begin{alignat*}{5}\text{Core Streams:}\quad t & = & & 0.000006x^2 & {}+{} & 13.407192x & {}-{} & 265821.616000\\ \text{Pacman:}\quad t & = & & 0.000005x^2 & {}+{} & 13.637878x & {}-{} & 265358.030217\end{alignat*}

Core Streams

Pacman

Core Streams

1.000000

1.058144

Pacman

0.945051

1.000000

\frac{Q}{R}(x)=6.367100x^{-1}+1.022778

3.2 just-map🔗

Benchmark took 7142.9 seconds (1:59:02).
Core Streams:
(λ (vs)
  (cs:stream→list
   (cs:map sqr
           (cs:list→stream vs))))
Pacman:
(λ (vs)
  (cps:stream→list
   (cps:map sqr
            (cps:list→stream vs))))
\begin{alignat*}{5}\text{Core Streams:}\quad t & = & & 0.000004x^2 & {}+{} & 15.471862x & {}-{} & 312296.935711\\ \text{Pacman:}\quad t & = & & 0.000004x^2 & {}+{} & 15.463741x & {}-{} & 317090.615211\end{alignat*}

Core Streams

Pacman

Core Streams

1.000000

0.996468

Pacman

1.003545

1.000000

\frac{Q}{R}(x)=4.367966x^{-1}+1.051860

3.3 just-filter🔗

Benchmark took 7159.5 seconds (1:59:19).
Core Streams:
(λ (vs)
  (cs:stream→list
   (cs:filter odd?
              (cs:list→stream vs))))
Pacman:
(λ (vs)
  (cps:stream→list
   (cps:filter odd?
               (cps:list→stream vs))))
\begin{alignat*}{5}\text{Core Streams:}\quad t & = & & & & 14.484018x & {}+{} & 32287.712484\\ \text{Pacman:}\quad t & = & & & & 13.526427x & {}+{} & 40284.313549\end{alignat*}

Core Streams

Pacman

Core Streams

1.000000

1.049500

Pacman

0.952835

1.000000

\frac{Q}{R}(x)=2.704340x^{-1}+1.081420

3.4 just-foldl🔗

Benchmark took 7269.1 seconds (2:01:09).
Core Streams:
(λ (vs)
  (cs:foldl cons null
            (cs:list→stream vs)))
Pacman:
(λ (vs)
  (cps:foldl cons null
             (cps:list→stream vs)))
\begin{alignat*}{5}\text{Core Streams:}\quad t & = & & 0.000006x^2 & {}+{} & 8.491770x & {}-{} & 253171.843507\\ \text{Pacman:}\quad t & = & & 0.000005x^2 & {}+{} & 9.089729x & {}-{} & 287420.392407\end{alignat*}

Core Streams

Pacman

Core Streams

1.000000

0.972066

Pacman

1.028737

1.000000

\frac{Q}{R}(x)=5.908609x^{-1}+1.035305

3.5 range-filter-map🔗

Benchmark took 8105.1 seconds (2:15:05).
Core Streams:
(λ (high)
  (cs:stream→list
   (cs:map sqr
           (cs:filter odd?
                      (cs:range 0 high 1)))))
Pacman:
(λ (high)
  (cps:stream→list
   (cps:map sqr
            (cps:filter odd?
                        (cps:range 0 high 1)))))
\begin{alignat*}{5}\text{Core Streams:}\quad t & = & & 0.000003x^2 & {}+{} & 25.805314x & {}-{} & 300118.857589\\ \text{Pacman:}\quad t & = & {}-{} & 0.000002x^2 & {}+{} & 10.991221x & {}-{} & 44479.275714\end{alignat*}

Core Streams

Pacman

Core Streams

1.000000

2.783278

Pacman

0.359289

1.000000

\frac{Q}{R}(x)=-11.535838x^{-1}+2.484553

3.6 range-map-take🔗

Benchmark took 8154.8 seconds (2:15:54).
Core Streams:
(λ (high)
  (define n (add1 (quotient high 3)))
  (cs:stream→list
   (cs:take n
            (cs:map sqr
                    (cs:range 0 high 1)))))
Pacman:
(λ (high)
  (define n (add1 (quotient high 3)))
  (cps:stream→list
   (cps:take n
             (cps:map sqr
                      (cps:range 0 high 1)))))
\begin{alignat*}{5}\text{Core Streams:}\quad t & = & & 0.000004x^2 & {}+{} & 10.651897x & {}-{} & 83110.417584\\ \text{Pacman:}\quad t & = & & & & 4.641859x & {}+{} & 4450.468615\end{alignat*}

Core Streams

Pacman

Core Streams

1.000000

3.427580

Pacman

0.291751

1.000000

\frac{Q}{R}(x)=-16.644903x^{-1}+2.467493

3.7 filter-map-foldl🔗

Benchmark took 7686.3 seconds (2:08:06).
Core Streams:
(λ (vs)
  (cs:foldl + 0
            (cs:map sqr
                    (cs:filter odd?
                               (cs:list→stream vs)))))
Pacman:
(λ (vs)
  (cps:foldl + 0
             (cps:map sqr
                      (cps:filter odd?
                                  (cps:list→stream vs)))))
\begin{alignat*}{5}\text{Core Streams:}\quad t & = & & & & 17.300161x & {}+{} & 49471.979141\\ \text{Pacman:}\quad t & = & & & & 11.327744x & {}+{} & 41796.147861\end{alignat*}

Core Streams

Pacman

Core Streams

1.000000

1.472608

Pacman

0.679067

1.000000

\frac{Q}{R}(x)=4.951969x^{-1}+1.556021

3.8 range-filter-map-foldl🔗

Benchmark took 9502.5 seconds (2:38:22).
Core Streams:
(λ (high)
  (cs:foldl + 0
   (cs:map sqr
           (cs:filter odd?
                      (cs:range 0 high 1)))))
Pacman:
(λ (high)
  (cps:foldl + 0
   (cps:map sqr
            (cps:filter odd?
                        (cps:range 0 high 1)))))
\begin{alignat*}{5}\text{Core Streams:}\quad t & = & {}-{} & 0.000001x^2 & {}+{} & 14.290584x & {}-{} & 3088.939114\\ \text{Pacman:}\quad t & = & & & & 7.139677x & {}-{} & 11041.978861\end{alignat*}

Core Streams

Pacman

Core Streams

1.000000

2.294361

Pacman

0.435851

1.000000

\frac{Q}{R}(x)=-1.853996x^{-1}+2.089104

3.9 long-functional-pipeline🔗

Benchmark took 8095.0 seconds (2:14:54).
Core Streams:
(λ (high)
  (cs:foldl +
            0
            (cs:map (λ (v) (* 2 v))
                    (cs:filter (λ (v) (< (remainder v 10) 5))
                               (values
                                (cs:map sqr
                                        (cs:filter odd?
                                                   (cs:range 0 high 1))))))))
Pacman:
(λ (high)
  (cps:foldl +
             0
             (cps:map (λ (v) (* 2 v))
                      (cps:filter (λ (v) (< (remainder v 10) 5))
                                  (values
                                   (cps:map sqr
                                            (cps:filter odd?
                                                        (cps:range 0 high 1))))))))
\begin{alignat*}{5}\text{Core Streams:}\quad t & = & {}-{} & 0.000002x^2 & {}+{} & 21.926755x & {}-{} & 3568.377773\\ \text{Pacman:}\quad t & = & & & & 14.374558x & {}+{} & 30746.298235\end{alignat*}

Core Streams

Pacman

Core Streams

1.000000

1.408147

Pacman

0.710153

1.000000

\frac{Q}{R}(x)=10.015516x^{-1}+1.484894