We're updating the issue view to help you get more done. 

Map entry much slower for first

Description

If you do apply first to the result of getting an entry from a map, things are now slower.

Before: (https://github.com/clojure/clojurescript/commit/9ddd356d344aa1ebf9bd9443dd36a1911c92d32f)

1 2 3 4 5 6 7 8 9 10 Benchmarking with V8 [me (first {:a 1})], (first me), 10000000 runs, 267 msecs Benchmarking with SpiderMonkey [me (first {:a 1})], (first me), 10000000 runs, 378 msecs Benchmarking with JavaScriptCore [me (first {:a 1})], (first me), 10000000 runs, 406 msecs Benchmarking with Nashorn [me (first {:a 1})], (first me), 10000000 runs, 2232 msecs Benchmarking with ChakraCore [me (first {:a 1})], (first me), 10000000 runs, 1204 msecs

After: (https://github.com/clojure/clojurescript/commit/91431bd556f7a11db59319fcc082737a448f651e)

1 2 3 4 5 6 7 8 9 10 Benchmarking with V8 [me (first {:a 1})], (first me), 10000000 runs, 1106 msecs Benchmarking with SpiderMonkey [me (first {:a 1})], (first me), 10000000 runs, 720 msecs Benchmarking with JavaScriptCore [me (first {:a 1})], (first me), 10000000 runs, 689 msecs Benchmarking with Nashorn [me (first {:a 1})], (first me), 10000000 runs, 6711 msecs Benchmarking with ChakraCore [me (first {:a 1})], (first me), 10000000 runs, 1969 msecs

Environment

None

Status

Assignee

David Nolen

Reporter

Mike Fikes

Labels

Approval

None

Patch

Code

Priority

Major