V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
zckevin
V2EX  ›  Apple

Rust 用户 Rik Arends 表示新 MacBook Air 让编译 Rust 变得像写脚本语言一样轻松

  •  
  •   zckevin · 2020-11-17 15:53:18 +08:00 · 3879 次点击
    这是一个创建于 1227 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Rik Arends,Rust 用户,在线多人协作 IDE Makepad 作者
    https://twitter.com/rikarends
    https://github.com/makepad/makepad
    https://makepad.dev/

    Makepad on apple M1: had to add the target in Cargo Aaan BUILDS AND RUNS in one go! Go Rust! Compiles the whole thing release in 18!!! seconds. Compare that to my mb16 i9: 37 seconds. ITS TWICE the performance of an i9 on Rust compiles.

    Wow i'm massively impressed now. The M1 cuts my compiletimes in HALF. Writing makepad in Rust is now almost like scripting a webpage :)

    As of today i'm now looking at compiling a full desktop IDE in release mode with all deps in 18 seconds. I think Rust is starting to look very appealing with the arrival of the M1, the disadvantage of compiled languages on that domain is shrinking.

    Many webpack/TS projects take a lot longer.

    Comparing TDP: The i9 is a 45W TDP, the M1 is 10W. So apple cut the power by 4,5 and increased the compile speed by 2x. I think some CPU manufacturers are having a bad day.
    25 条回复    2020-11-17 20:12:42 +08:00
    nguoidiqua
        1
    nguoidiqua  
       2020-11-17 16:05:52 +08:00   ❤️ 6
    从此,编译也不准代表处理器真实性能了。
    denvi
        2
    denvi  
       2020-11-17 16:08:24 +08:00 via iPhone
    @nguoidiqua 哈哈哈
    zhaidoudou123
        3
    zhaidoudou123  
       2020-11-17 16:11:20 +08:00
    @nguoidiqua #1 太草了
    哈哈哈哈
    Removable
        4
    Removable  
       2020-11-17 16:11:26 +08:00
    > I think some CPU manufacturers are having a bad day
    英特尔打了个喷嚏
    1if5ty3
        5
    1if5ty3  
       2020-11-17 16:15:18 +08:00
    @nguoidiqua 晕死,隔壁还有说剪辑视频不能代表真实性能的。。。
    那啥是真实性能,风扇转越快性能越高吗?
    nguoidiqua
        6
    nguoidiqua  
       2020-11-17 16:19:39 +08:00
    @1if5ty3

    发热代表真实性能…
    richzhu
        7
    richzhu  
       2020-11-17 16:20:44 +08:00
    @1if5ty3 听他们瞎扯,变快了就是优化啊,优化好了就行提升了性能呀
    stimw
        8
    stimw  
       2020-11-17 16:22:15 +08:00
    我纠结 air 满血版和 pro 差在哪
    CommandZi
        9
    CommandZi  
       2020-11-17 16:24:50 +08:00
    @Removable 暂时应该还威胁不到 Intel,因为苹果的这个 M1 并不是通用芯片,暂时也看不到苹果会开放的迹象。
    Liuthx
        10
    Liuthx  
       2020-11-17 16:30:18 +08:00
    @CommandZi 苹果开路之后其他厂商会迅速跟进, 高通 + 微软组合才是真正干掉 Intel 的主力, 原本高通的角色应该由华为来承担的, 可惜了.
    studyro
        11
    studyro  
       2020-11-17 16:31:24 +08:00
    AppleBench 的跑分你高兴就好;
    SPEC2006 早被处理器厂商研究透了,必然专门优化过;
    Cinebench 被苹果充值了吧;
    视频编辑走了专用电路,通用计算应该不能打;
    Xcode 编译苹果上下打通做些手脚易如反掌,性能方面没有参考价值。
    CommandZi
        12
    CommandZi  
       2020-11-17 16:32:09 +08:00
    @Liuthx 问题是高通的芯片能不能提供和 M1 差不多的能耗比
    CommandZi
        13
    CommandZi  
       2020-11-17 16:33:09 +08:00
    @Liuthx 实际上我更期待英伟达,毕竟前不久刚收了 ARM 公司
    denvi
        14
    denvi  
       2020-11-17 16:37:14 +08:00 via iPhone
    @CommandZi 在 pc 端,真正能背刺 intel 的是 win,看消息微软有好几个项目都在往苹果和 arm 靠…
    denvi
        15
    denvi  
       2020-11-17 16:40:25 +08:00 via iPhone
    @CommandZi 没完成,中国 99%不会同意
    nguoidiqua
        16
    nguoidiqua  
       2020-11-17 16:46:42 +08:00
    @CommandZi

    骁龙 875+ CPU 单核大概能有 1200,多核能有 4500~5000,虽然不如 M1 但也能吊打很多垃圾 intel 处理器了。

    GPU 的话,875+ GPU 性能多少还不知道,不过之前高通给微软定制的 SQ2 GPU 算力大概有 M1 80~85% 的样子,也强过之前的 intel 集显了,但 intel 也出新集显了,跟 4800U Vega 8 差不多水准,现在大家集显都差不多了。

    如果高通在 875+ 的基础上面再提高点功耗,放到电脑上应该也不错了,就看微软 Windows10 的二进制转换兼容性和效率能不能做好点了。
    changepc90
        17
    changepc90  
       2020-11-17 16:51:01 +08:00
    问题是 M1 编译出来的 rust 既不能放到 x86 服务器上跑,现在也没别的 arm 服务器能跑。。。
    HXHL
        18
    HXHL  
       2020-11-17 16:52:29 +08:00
    @changepc90 肯定可以交叉编译,arm 能编译 x86
    denvi
        19
    denvi  
       2020-11-17 16:52:51 +08:00 via iPhone
    @nguoidiqua 对,全网对 rosetta 2 的讨论很少,但这也是很关键一环啊,理论上这块微软来做的话应该比苹果要有优势
    aneostart173
        20
    aneostart173  
       2020-11-17 16:55:23 +08:00
    @changepc90 交叉编译啊
    changepc90
        21
    changepc90  
       2020-11-17 16:56:02 +08:00
    @HXHL 还要看看交叉编译的效率了,过去从 arm 上交叉编译到 x86 不怎么多见。
    nguoidiqua
        22
    nguoidiqua  
       2020-11-17 17:00:55 +08:00
    @denvi

    Surface Pro X 上面的二进制转换效率目前来看不如苹果的 Rosetta2,微软那个只有一半性能,苹果的能有七八成。
    denvi
        23
    denvi  
       2020-11-17 17:14:23 +08:00 via iPhone
    @nguoidiqua 唔…微软真下决心做,估计还是行的,如果越来越多 x86 专业软件大玩家被拉到 arm 的阵营里,那对微软就伤筋动骨了
    agagega
        24
    agagega  
       2020-11-17 19:54:49 +08:00
    rust 后端是 llvm 啊,交叉编译有天然优势
    cxh116
        25
    cxh116  
       2020-11-17 20:12:42 +08:00
    @denvi 你可以收台 Surface RT 来玩玩,闲鱼上面 200 左右.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5356 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 372ms · UTC 05:49 · PVG 13:49 · LAX 22:49 · JFK 01:49
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.