Created
July 6, 2013 07:18
-
-
Save dkvasnicka/5939035 to your computer and use it in GitHub Desktop.
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
(let [rng (doall (range 1000000))] | |
(time (reduce + (map * rng rng)))) |
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
(let ((range (loop for i from 0 below 1000000 collect i))) | |
(time (reduce '+ (map 'list '* range range)))) |
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 | |
(let [[rng (range 1000000)]] | |
(time (foldl + 0 (map * rng rng)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment