SHARE
TWEET

Loading vast numbers of classes

a guest Jun 4th, 2012 32 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (ns org.tomhume.so.LoadManyClasses)
  2. (use 'org.tomhume.so.Bytecode)
  3.  
  4. (defn test-class
  5.   "Makes class number n"
  6.   [n]
  7.   (let [class (get-class '(:iload 0 :ireturn) (str "Identity3-" n) "identity" "(I)I")]
  8.     (do (if (= 0 (mod n 1000)) (println n)) true)))
  9.  
  10. (time (doall (map #(test-class %) (range 0 100000))))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top