IIRC, Guice already uses some cglib trickery
<https://github.com/google/guice/blob/2c80ab4257ba96e25ab658a3f4355f66a4fc48d0/core/src/com/google/inject/internal/DefaultConstructionProxyFactory.java>
to instantiate objects where possible.

sam

On Tue, Oct 21, 2014 at 2:52 PM, Kevin Burton <[email protected]> wrote:

> 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)
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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
> <https://groups.google.com/d/msgid/google-guice/dc363c45-5623-47e1-846a-305157e0c017%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/CAJEBNUfoOPmykT3goL7c9B3Tww9z1zYPwrf9Z%2BOBs9Nw%2Brtwsw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to