Visual Studio for mac、Xamarin.forms,用 M1 跑点不同的东西
拿了我司的一个 xamarin.forms 项目,在 Mac mini M1 上以 rosetta2 翻译的方式运行 vs for mac,编译环境版本信息如下:
Visual Studio Community 2019 for Mac
Version 8.8 (build 2913)
Mono Framework MDK
Runtime:
Mono 6.12.0.93 (2020-02/620cf538206) (64-bit)
Roslyn (Language Service)
3.8.0-5.20515.7+713efb0e68d34ab75faaf709e071e5c2d8d4ed0e
.NET Core 3.1 SDK
SDK: 3.1.403
Apple Developer Tools
Xcode 12.2 (17535)
Build 12B45b
Xamarin.iOS
Version: 14.4.1.3
使用了SkiaSharp.Views.Forms
、Xam.Plugin
、ZXing.Net.Mobile.Forms
等三方包。
系统版本都是 macOS 10.0.1 (20B29),项目设为 release 配置,目标为通用设备
- 一套 i7 8700 的编译耗时 37.50s
- Mac mini M1 的编译耗时 54.80s
不过考虑到 cb r23 中 M1 多核性能只有 8700 的 88%,rosetta2 翻译运行又会损耗 20 ~ 25%左右的性能,这样对照结果看看即可,鉴于微软是苹果最优质的开发者,arm 原生版本工具链应该很快可以出来。
其实主要是为了测试一下目前 xamarin.forms 的开发有没有什么问题,好像是没有什么问题。