-
Notifications
You must be signed in to change notification settings - Fork 141
Description
Tips from @ashishnegi about managing lazy garbage:
ashishnegi [6:41 PM]
hi.. i have heard that being a lazy language and on jvm, we add a lot of garbage.. forfaster garbage collection
of intermediate collections we give somehints to GC in bytecode
.. Can i get somereference
to how it is done ? any help appreciated..alexmiller [6:43 PM]
@ashishnegi: the compiler aggressively clears local references to make more objects available for GC.. That is, creates bytecode that clears references - a lot of that is done via the Util.ret calls..
Relevant links:
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L5046
https://groups.google.com/forum/#!searchin/clojure/local$20clearing|sort:relevance/clojure/FLrtjyYJdRU/itFqPRk0BrcJ
http://stackoverflow.com/questions/15994316/clojure-head-retention
This issue should be tackled after #23 since that ticket will make lots of nontrivial changes to the generated bytecode.