<< Back to previous view

[CLJS-508] Missing IReduce implementations and typo in clojure.core.reducers/append! Created: 21/May/13  Updated: 23/May/13  Resolved: 21/May/13

Status: Resolved
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Daniel Skarda Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None
Environment:

Fresh CLJS checkout from github


Attachments: Text File 0001-Add-IReduce-protocol-to-LazySeq.patch     Text File reducers.patch    
Patch: Code and Test

 Description   

1) IReduce protocol is missing implementation for array and List.
2) append! uses (.add array), while the correct array method name is push

Patch attached.

Note: what is your experience with array.push performance? ClojureScript reducers/foldcat uses arrays for append! / cat implementation. My experience was that (into [] ...) using conj! and TransientVector was at least 5 times faster than reducers/foldcat using array and push. The reason is probably inefficient push implementation in Chrome/V8



 Comments   
Comment by David Nolen [ 21/May/13 9:59 AM ]

Thanks for the patch. I doubt that array push is inefficient, but I imagine the regularity of TransientVector operations is something that V8 likes.

Comment by David Nolen [ 21/May/13 10:03 AM ]

fixed, http://github.com/clojure/clojurescript/commit/30bb0b9e55fb77cdfe952fbf5df763a25c4a25c5

Comment by David Nolen [ 22/May/13 11:36 PM ]

BTW I notice you haven't submitted your Contributor Agreement (unless I'm mistaken). Please send that in at your earliest convenience thanks much!

Comment by Daniel Skarda [ 23/May/13 3:02 AM ]

Patch for missing IReduce protocol for LazySeq

Comment by Daniel Skarda [ 23/May/13 3:10 AM ]

@swannodette: Ok, I will send it today.





[CLJS-499] Reassess ObjectMap vs. PersistentArrayMap Created: 25/Apr/13  Updated: 20/May/13  Resolved: 20/May/13

Status: Resolved
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: David Nolen Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None


 Description   

Here are some benchmarks after performance improvements have been applied to PersistentArrayMap in master:

For the smallest sizes PAMs are nearly identical in performance to OMs, as we start nearing the PHM threshold PAMs are nearly 2X faster on WebKit Nightly, and nearly 3X faster on the latest Chrome. Only Firefox Nightly lags behind for lookup times at larger sizes.

Again we see nearly identical (or much better) performance at small sizes and much better performance for PAMs as we approach the PHM threshold.



 Comments   
Comment by Tyler Tallman [ 07/May/13 12:11 PM ]

When I try to run the jsprefs I get "ReferenceError: cljs_perf is not defined."

Comment by David Nolen [ 20/May/13 7:59 AM ]

fixed, http://github.com/clojure/clojurescript/commit/08489f39060be1097fa23abc8d5042c86e68dd4d





Generated at Sat May 25 05:04:26 CDT 2013 using JIRA 4.4#649-r158309.