On Thu, Sep 27, 2012 at 6:33 PM, Ross Bamford <[email protected]> wrote:
> On Thursday, 27 September 2012 18:28:40 UTC+1, Kristopher Micinski wrote:
>>
>> I agree that reflection will kill you.  I actually hadn't thought
>> about this, but it seems like there should be some sort of analysis to
>> be able to get rid of the overly large reflective cost.  Since inside
>> your interpreter you will use a fairly fixed set of reflective calls,
>> I would assume that for (example) long loops inside the program
>> reflective calls could also be handled by the JIT (but, I assume they
>> are *not*).  Still, I agree that if the numbers are as you say, then
>> having a compiler to Dex bytecode will help.
>>
>
> To be fair, the implementation of the Dee VM could be improved somewhat in
> this respect, although at the cost of flexibility. And in any event,
> performance would still never reach that of Dex compiled scripts, since the
> JIT cannot optimize reflection to the same extent as it does bytecode
> because it can't make the same kind of assumptions as it can when the code
> is statically compiled.
>

Not necessarily true (and easier in a trace based JIT, I believe), if
you can reason about the contents of strings and do proper linking.

> (Caveat: I admit that I am basing this on the JVM - I simply don't know
> enough about Android's JIT at this point to discuss it specifically).
>

I don't think that Dalvik's jit does this, however..

>>
>> FYI from a research standpoint I am interested in doing something with
>> this.  I was going to work on implementing my own language for
>> scripting apps, but I feel that would be a slight waste of time, as I
>> really care more about the semantics within apps.
>>
>> So this is cool, I'd like to see if the language you have models the
>> sort of thing I want to express, I believe it may.  In any case, I
>> will take a look at your compiler this weekend.
>>
>
> Excellent. I would definitely welcome any feedback you have!
>
>>
>> FYI during a project I work on we've written a compiler (really binary
>> rewriter) for Dalvik bytecode in OCaml, though if you wanted to use it
>> as part of your project you would have to properly port the ocaml
>> runtime to Android (unless you could deal with doing development on a
>> machine and  then having it loaded to a phone all the time, which I
>> probably would for my research purposes..).
>
>
> This interests me. Is this a publicly-available project? If so, do you have
> a link so I could take a look?
>

Not quite yet, but soon...

It's described on our paper.. http://www.cs.umd.edu/~jfoster/papers/spsm12.pdf

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to