android studio 和 xamarin,c# – 在Xamarin for Android中启用AOT(Visual Studio)

AOT你的程序集/代码不会改变应用程序初始化的启动(本机应用程序引导程序Xamarin / Mono初始化但不包括任何代码执行时间).

现在,如果你正在进行X代码中的CPU工作量,比如OnCreate(你真的不应该这样做),你会(应该)看到总时间的减少.我说应该由于AOT’ing并不能保证你会看到特定部分代码的执行时间更快,它确实消除了抖动,但还有很多其他因素.我已经使用Mono(AOT w /& w / o LLVM)多年了,你真的需要对你的代码进行测试和测试.

Although the JIT mode is very fast, and the default optimizations in Mono have been tuned to provide a good balance between optimizations and JIT speed, AOT compilation provides a few extra benefits:

Reduced startup time.

注意:这对于可能需要在运行之前执行大量代码的大型程序特别有用…

Potential better performance.

注意:……这意味着某些程序可能运行速度较慢,因为生成的代码比JIT可以生成的特定代码更通用.

启用LLVM和AOT来测试发布版本:

在优化AOT代码方面,在发布版本中启用LLVM和AOT以进行性能/仪器测试.注意:测试是关键,拥有完整的应用程序测试套件和内部工具来收集运行时性能是获得应用程序商店的5星评价的关键;-)

EnableLLVM

A boolean property that determines whether or not LLVM will be used when Ahead-of-Time compiling assemblines into native code.

Support for this property was added in Xamarin.Android 5.1.

This property is False by default.

This property is ignored unless the $(AotAssemblies) MSBuild property is True.

AotAssemblies

A boolean property that determines whether or not assemblies will be Ahead-of-Time compiled into native code and included in the .apk.

Support for this property was added in Xamarin.Android 5.1.

This property is False by default.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值