You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the reasoning in haxetink/tink_http#105 it should actually be ok to mark safe methods as @:pure on remoting proxies. This will allow the compiler to optimize away quite a bit of code:
If nobody accesses Data.foo, then the compiler can DCE the field and because its initialization is pure also eliminate the code and therefore the call on the proxy and the corresponding parser and so forth.
Users could opt out from this via metadata (can be applied to whole class). Using existing compiler semantics @:pure(false) would be the way to go, although I dislike the notation a bit. Perhaps @:unsafe would be more intuitive - although that conflicts with hxcs \o/
The text was updated successfully, but these errors were encountered:
Following the reasoning in haxetink/tink_http#105 it should actually be ok to mark safe methods as
@:pure
on remoting proxies. This will allow the compiler to optimize away quite a bit of code:If nobody accesses
Data.foo
, then the compiler can DCE the field and because its initialization is pure also eliminate the code and therefore the call on the proxy and the corresponding parser and so forth.Users could opt out from this via metadata (can be applied to whole class). Using existing compiler semantics
@:pure(false)
would be the way to go, although I dislike the notation a bit. Perhaps@:unsafe
would be more intuitive - although that conflicts with hxcs \o/The text was updated successfully, but these errors were encountered: