This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-15
Channels
- # beginners (34)
- # boot (45)
- # cider (16)
- # cljs-dev (20)
- # cljsjs (1)
- # cljsrn (8)
- # clojure (207)
- # clojure-berlin (3)
- # clojure-dev (18)
- # clojure-greece (1)
- # clojure-ireland (1)
- # clojure-italy (9)
- # clojure-russia (20)
- # clojure-spec (27)
- # clojure-uk (19)
- # clojurescript (110)
- # code-reviews (2)
- # cursive (7)
- # data-science (2)
- # datomic (7)
- # devcards (1)
- # emacs (4)
- # graphql (1)
- # hoplon (2)
- # immutant (15)
- # jobs (5)
- # jobs-rus (1)
- # juxt (1)
- # luminus (7)
- # lumo (26)
- # microservices (3)
- # off-topic (27)
- # om (13)
- # onyx (11)
- # pedestal (7)
- # proton (4)
- # re-frame (24)
- # remote-jobs (1)
- # spacemacs (2)
- # specter (2)
- # unrepl (31)
- # untangled (7)
- # vim (14)
Added comment to https://dev.clojure.org/jira/browse/CLJS-1871 a few days ago (self calls aren't optimized). This is pretty different to the original ticket.
1. Should this go into a separate ticket?
2. Most performance is for TreeMap. reduce-kv
is about 2-3x faster (Chrome,FF) with proper calls, dissoc
about 1.5-1.8x faster.
3. There is also: https://dev.clojure.org/jira/browse/CLJS-275 . Is this a regression?
Also have you had a look at: https://clojurescript.org/reference/compiler-options#static-fns
@anmonteiro Thanks for the patches of the last few issues!
@rauh there is also https://dev.clojure.org/jira/browse/CLJS-1992 which messes with some method calls, don't remember if maybe one of yours is affected by this.
So I'm thinking this is a regression then. I'm seeing this in advanced+pseudo build:
var $cljs$core$tree_map_kv_reduce$$ = function $cljs$core$tree_map_kv_reduce$$($node$jscomp$35$$, $f$jscomp$244$$, $init$jscomp$14$$) {
var $init__$1$jscomp$8$$ = null != $node$jscomp$35$$.left ? function() {
var $init__$1$jscomp$8$$ = $node$jscomp$35$$.left;
return $cljs$core$tree_map_kv_reduce$$.$cljs$core$IFn$_invoke$arity$3$ ? $cljs$core$tree_map_kv_reduce$$.$cljs$core$IFn$_invoke$arity$3$($init__$1$jscomp$8$$, $f$jscomp$244$$, $init$jscomp$14$$) : $cljs$core$tree_map_kv_reduce$$.call(null, $init__$1$jscomp$8$$, $f$jscomp$244$$, $init$jscomp$14$$);
}() : $init$jscomp$14$$;
if ($cljs$core$reduced_QMARK_$$($init__$1$jscomp$8$$)) {
return $cljs$core$_deref$$($init__$1$jscomp$8$$);
}
var $init__$2$jscomp$9$$ = function() {
var $init$jscomp$14$$ = $node$jscomp$35$$.key, $init__$2$jscomp$9$$ = $node$jscomp$35$$.$val$;
return $f$jscomp$244$$.$cljs$core$IFn$_invoke$arity$3$ ? $f$jscomp$244$$.$cljs$core$IFn$_invoke$arity$3$($init__$1$jscomp$8$$, $init$jscomp$14$$, $init__$2$jscomp$9$$) : $f$jscomp$244$$.call(null, $init__$1$jscomp$8$$, $init$jscomp$14$$, $init__$2$jscomp$9$$);
}();
if ($cljs$core$reduced_QMARK_$$($init__$2$jscomp$9$$)) {
return $cljs$core$_deref$$($init__$2$jscomp$9$$);
}
var $init__$3$jscomp$2$$ = null != $node$jscomp$35$$.right ? function() {
var $init$jscomp$14$$ = $node$jscomp$35$$.right;
return $cljs$core$tree_map_kv_reduce$$.$cljs$core$IFn$_invoke$arity$3$ ? $cljs$core$tree_map_kv_reduce$$.$cljs$core$IFn$_invoke$arity$3$($init$jscomp$14$$, $f$jscomp$244$$, $init__$2$jscomp$9$$) : $cljs$core$tree_map_kv_reduce$$.call(null, $init$jscomp$14$$, $f$jscomp$244$$, $init__$2$jscomp$9$$);
}() : $init__$2$jscomp$9$$;
return $cljs$core$reduced_QMARK_$$($init__$3$jscomp$2$$) ? $cljs$core$_deref$$($init__$3$jscomp$2$$) : $init__$3$jscomp$2$$;
};
(declare helper)
(defn redirect-helper
[a b]
(helper a b))
(defn helper
[a b]
(js/console.log a b))
testapp.core.redirect_helper = (function testapp$core$redirect_helper(a,b){
return (testapp.core.helper.cljs$core$IFn$_invoke$arity$2 ? testapp.core.helper.cljs$core$IFn$_invoke$arity$2(a,b) : testapp.core.helper.call(null,a,b));
});
testapp.core.helper = (function testapp$core$helper(a,b){
return console.log(a,b);
});
hrm this maybe less a regression then it never working on self calls of fns with only one arity implementation