Wednesday, January 27, 2016

Re: JsInterop and indexed types



On Saturday, January 23, 2016 at 11:09:50 AM UTC+3, Alexey Andreev wrote:

Famous TeaVM also can`t do that, unfortunately. 
 You are wrong. You can do that via @JSIndexer annotation. 

Sorry for by bad english. 
I meant a different thing.

Consider

class A { 
  int [] computeInJava() {...};
}

class B {
  native void aJsMethod(int data[]) /*-   expect reference to original Int32Array in the argument   -*/;
 }

b.aJsMethod(a.computeInJava());

It is not possible to do such things neither in GWT, nor in TeaVM. 
Not TeaVM, not GWT does not allow passing java arrays as native arrays to native JS code without making a copy.

Also, did you try to write benchmarks before claiming that wrapper slows down performance? V8 performs sophisticated performance optimizations. 

You are very right, there is no point talking about performance without real numbers.
I will reply when I write a test and have a results.

Thanks 
 

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment