Skip to content

Aggressively clear local references #79

@rahulmutt

Description

@rahulmutt

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.. for faster garbage collection of intermediate collections we give some hints to GC in bytecode.. Can i get some reference 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions