<< Back to previous view

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

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

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

Fresh CLJS checkout from github


Attachments: 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






[CLJS-507] Persistent Data Structure Benchmark Created: 20/May/13  Updated: 20/May/13

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

Type: Task Priority: Major
Reporter: David Nolen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Put together an easy to run series of persistent data structure benchmarks that can be easily run. For example we would like to submit to this Mozilla ticket http://bugzilla.mozilla.org/show_bug.cgi?id=874174






[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





[CLJS-506] Flag to disable minification in advanced mode Created: 19/May/13  Updated: 19/May/13

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

Type: Enhancement Priority: Major
Reporter: Herwig Hochleitner Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Attachments: Text File 0001-CLJS-506-Add-a-debug-flag-to-the-compiler-options.patch    

 Description   

Problem:
Some code has different semantics when compiled in advanced mode.
Clojurescript tries to minimize those cases, but examples are usage of aget or forgotten externs files.
There exits closure compiler options to generate names based on original expressions, even with advanced optimizations.
However, there exists no clojurescript compiler option for that.

Proposal:
Add a :debug compiler option to clojurescript, which can be set to true to turn the following closure compiler options on:

  • generatePseudoNames true
  • anonymousFunctionNaming AnonymousFunctionNamingPolicy/UNMAPPED

Attached patch implements this, as a result the compiled test suite is indeed quite readable.



 Comments   
Comment by Herwig Hochleitner [ 19/May/13 10:11 AM ]

Patch 0001 depends on patches 0001 and 0002 from CLJS-480 because of changes to the test script.





[CLJS-480] *cljs-data-readers* is bound to *data-readers* inconsistently Created: 01/Mar/13  Updated: 17/May/13

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

Type: Defect Priority: Major
Reporter: Chas Emerick Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Attachments: Text File 0001-CLJS-480-bind-data-readers-in-parse-ns.patch     Text File 0002-Bring-back-multiple-test-compilations-and-overhaul-o.patch    

 Description   

It looks like *cljs-data-readers* is not being bound to *data-readers* where it should be.

At a minimum, cljs.repl/load-stream does not. The practical effect of this instance is that e.g. (load-file "some/cljs/file.cljs") will fail if that file or any other contains a user-defined literal tag. Similar behaviour exists elsewhere, e.g. (load-namespace 'some.cljs.ns) will not load a namespace that contains user-defined tags (I think that one is due to *cljs-data-readers* not being bound in the analyzer).

This is related to CLJS-479 insofar as it's another symptom of ClojureScript loading code in subtly different ways in multiple places.

I'm happy to do either of:

  1. submit issues+patches fixing issues as I encounter them, or
  2. attempt a more significant refactoring that sets up (hopefully) one and only one place where ClojureScript reads code (i.e. uses LispReader) so that behaviour can be consistent

I'm somewhat hesitant re: (2) insofar as the specific requirements of the compiler and analyzer and REPL may be divergent in ways that I'm not yet aware of, but it seems like it's worth a shot.



 Comments   
Comment by Herwig Hochleitner [ 17/May/13 3:10 PM ]

Attached patch 0001 binds data-readers in cljs.compiler/parse-ns.

This allows the compiler to run, even if files with reader tags are already compiled.

This in turn allows multiple test compilations to be brought back, which I'll submit as part of a patch for an additional debugging flag, if nobody beats me to it.

I think this won't fix load-file , but after the hotfix we should probably look for the proper place in the compiler to bind data-readers.

Comment by Herwig Hochleitner [ 17/May/13 5:25 PM ]

Patch 0002 is my overhaul for the test script.
Since it's a test case for patch 0001, I think it's justifiable on this ticket.

Note: On my machine, with SpiderMonkey 185, the test case (not (integer? 1e+308)) fails. It probably doesn't have to do anything with the removed -n flag (there is no js -n omm), I just wanted to mention it.





Generated at Tue May 21 08:08:22 CDT 2013 using JIRA 4.4#649-r158309.