<< Back to previous view

[CLJS-844] Optimize js->clj by switching to transducers Created: 22/Aug/14  Updated: 22/Aug/14

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

Type: Enhancement Priority: Trivial
Reporter: Darrick Wiebe Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Attachments: Text File use-transducers-in-js-to-clj.patch    

 Description   

This simple patch just switches a couple of lines to use transducers. I made this change after finding that using transducers for these types of mappings is significantly faster in (at least in Chrome).

I've checked that this code is being actually tested and both pass under V8 and JavaScriptCore.






[CLJS-843] Compiling with :target :nodejs, resulting code loses CL args Created: 22/Aug/14  Updated: 22/Aug/14

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

Type: Defect Priority: Major
Reporter: Peter Schwarz Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: nodejs
Environment:

Mac OS X 10.9.4, JDK 1.7.0_05, CLJS 0.0.2311



 Description   

Compiling with {:optimizations :advanced :target :nodejs} command line arguments are lost.

Using the following example code:

hello_cljs/core.cljs
(ns hello-cljs.core
    (:require [cljs.nodejs :as nodejs]
              [clojure.string :as s]))
 
(defn say-hello 
  [& args]
  (str (s/join " " (remove nil? (conj args "Hello")))))

(defn -main [ & args ]
  (println "Running...")
  (println (apply say-hello args)))
 
(nodejs/enable-util-print!)
(set! *main-cli-fn* -main)

with :simple optimizations:

> node hello.js me
Running...
Hello me

with :advanced optizations:

> node hello.js me
Running...
Hello

Expected behaviour should be that the results are equivalent.






Generated at Fri Aug 22 18:53:02 CDT 2014 using JIRA 4.4#649-r158309.