bytecode optimization for getInstance?

30 views
Skip to first unread message

Kevin Burton

unread,
Oct 21, 2014, 2:52:38 PM10/21/14
to google...@googlegroups.com
Are there any bytecode optimizations for getInstance or does it just use reflection?

Seems like one could use byte code gen to build a new factory and have it run without reflection overhead.

The first call will be pricey, but probably not worse than reflection.

And in tight loops you could still use guice without much of a performance penalty.

(thinking out loud here)

Sam Berlin

unread,
Oct 21, 2014, 3:05:51 PM10/21/14
to google...@googlegroups.com
IIRC, Guice already uses some cglib trickery to instantiate objects where possible.

sam

--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice...@googlegroups.com.
To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/dc363c45-5623-47e1-846a-305157e0c017%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages