Skip to content

Instantly share code, notes, and snippets.

@timsgardner
Created April 4, 2017 11:44
Show Gist options
  • Save timsgardner/fbcf73729dc25d1d38881e083536cbad to your computer and use it in GitHub Desktop.
Save timsgardner/fbcf73729dc25d1d38881e083536cbad to your computer and use it in GitHub Desktop.
cmpt timing
(do (require '[arcadia.internal.benchmarking :as b])
(use 'arcadia.core))
(def objo (object-named "Main Camera"))
(b/n-timing 1e6
(cmpt objo UnityEngine.Transform))
;; ~ 0.00026
(let [^UnityEngine.GameObject objo objo]
(b/n-timing 1e6
(.GetComponent objo UnityEngine.Transform)))
;; ~ 0.000095
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment