partition-by runs infinite loop when one element of infinite partition is accessed

Description

Port to ClojureScript.

Environment

None

Activity

Show:
Mike Fikes
September 16, 2018, 11:00 PM

Speedups for (simple-benchmark [r (range 100000)] (count (partition-by odd? r)) 10)

V8: 0.91
SpiderMonkey: 0.87
JavaScriptCore: 0.81
Nashorn: 0.96
ChakraCore: 0.87
GraalVM: 0.74

Mike Fikes
September 17, 2018, 1:12 AM

Patch LGTM. It is a little surprising that changing a seq to lazy-seq slows things down so much for the benchmark above. Otherwise the change passes on all of the Canary tests.

David Nolen
September 21, 2018, 8:37 PM

Assignee

David Nolen

Reporter

Mike Fikes

Labels

Approval

None

Patch

Code and Test

Priority

Major
Configure