Guest User

Untitled

a guest
Jul 23rd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. (benchmark** [identity empty? list? seq? first rest next seq]
  2. (concat (list (slow-computation))
  3. (list (slow-computation) (slow-computation))))
  4.  
  5. ; ========================================================================
  6. (concat
  7. (list (slow-computation))
  8. (list (slow-computation) (slow-computation)))
  9. ; seq : "Elapsed time: 0.019 msecs"
  10. ; next : "Elapsed time: 0.028 msecs"
  11. ; rest : "Elapsed time: 0.02 msecs"
  12. ; first : "Elapsed time: 0.024 msecs"
  13. ; seq? : "Elapsed time: 0.012 msecs"
  14. ; list? : "Elapsed time: 0.02 msecs"
  15. ; empty? : "Elapsed time: 0.025 msecs"
  16. ; identity : "Elapsed time: 0.011 msecs"
  17.  
  18. nil
  19. lazier.core> (benchmark* [identity empty? list? seq? first rest next seq]
  20. (concat (list (slow-computation)) (list (slow-computation) (slow-computation))))
  21.  
  22. ; ========================================================================
  23. (concat
  24. (list (slow-computation))
  25. (list (slow-computation) (slow-computation)))
  26. ; seq : "Elapsed time: 1500.205 msecs"
  27. ; next : "Elapsed time: 1500.356 msecs"
  28. ; rest : "Elapsed time: 1500.212 msecs"
  29. ; first : "Elapsed time: 1500.307 msecs"
  30. ; seq? : "Elapsed time: 1500.311 msecs"
  31. ; list? : "Elapsed time: 1500.281 msecs"
  32. ; empty? : "Elapsed time: 1500.171 msecs"
  33. ; identity : "Elapsed time: 1500.275 msecs"
Add Comment
Please, Sign In to add comment