<< Back to previous view

[CLJS-757] Redundant bounds checking in indexed types Created: 29/Jan/14  Updated: 24/Feb/14  Resolved: 24/Feb/14

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

Type: Enhancement Priority: Minor
Reporter: Francis Avila Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None
Environment:

r2156


Attachments: Text File cljs-757.patch     Text File cljs-757.patch    

 Description   

PersistentVector and TransientVector contain code paths where a bounds check is performed more than once unnecessarily.



 Comments   
Comment by Francis Avila [ 29/Jan/14 11:44 PM ]

Patch gives a minor across-the-board speedup on vector operations.

I also discovered and fixed an off-by-one check in PersistentVector's -seq, which causes an unnecessary ChunkedSeq to be created when vector length is exactly 32.

Comment by David Nolen [ 23/Feb/14 4:34 PM ]

Can we get a rebased version of this patch? Thanks.

Comment by Francis Avila [ 24/Feb/14 12:22 AM ]

Rebased cljs-757 with a change to unchecked-array-for-longvec (now first-array-for-longvec) and extra comments documenting invariants.

Comment by David Nolen [ 24/Feb/14 5:59 AM ]

fixed https://github.com/clojure/clojurescript/commit/0f943b616e36c65e0a8921fb838b71368fe9674c

Generated at Tue Oct 21 03:51:54 CDT 2014 using JIRA 4.4#649-r158309.