If eeking out every last bit of performance is your #1 concern, then no you
should not use ClojureScript functional operations over primitive arrays.
loop/recur, aget, aset and standard Array methods are your friends.

David

On Mon, Jun 2, 2014 at 9:52 AM, Andreas Arnold <[email protected]> wrote:

> You mean with `#js`? For example (def thing-one #js [1 2 3])? That way I
> can't use any ClojureScript methods like `map`, right?
>
> A example might help to really figure out what I am trying to do here. I
> have code like the following:
>
> (defn build-tile-vertices [x-coord y-coord]
>   (let [tile-template [[0 0 0]
>                        [1 0 0]
>                        [1 1 0]
>                        [0 1 0]]
>         translate (fn [[x y z]] [(+ x x-coord) (+ y y-coord) z])]
>     (mapcat translate tile-template)))
>
> Would there be a way to keep all of this directly as a JavaScript array?
> Or did you mean I should fall back to bare JavaScript? Or is there
> something totally different that I am missing?
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to