Rust并行编译的挑战与突破# Rust并行编译的挑战与突破 李原 2022年5月28日 ## 目录 - 相关浅谈 - Rust并行编译的挑战与突破 - 从并行编译到并行程序设计 - Rust社区与并行编译  ## 相关浅谈 ## Rust编译速度之殇 Rust编译速度之殇 ## 编译器设计造成编译速度缓慢  · 单态化 · 借用检查 · 宏展开 · MIR优化 Rust规模编译速度慢于C++  ## Rust编译速度之殇 ## 提升编译效率成为近年社区重点工作  2017-2021,Rust编译速度已提升一倍以上  我现在跟别人谈论Rust  ## 2 KCL 编译器架构升级 Python 代码翻译 Source Code Python code 栈式虚拟机 Source Code AST Bit code VM Rust 编译器 Source Code AST LLVM IR Native/WASM ## R ## 我们遇到了哪些问题?0 码力 | 25 页 | 3.50 MB | 2 年前3
1.2.2 GoLLVM 编译探索GO CN GoLLVM编译探索 马春辉 字节跳动程序语言团队工程师 目录 团队与个人 01 GoLLVM 背景 02 GoLLVM现状 03 GoLLVM问题解决 04 阶段性的成果 05 未来与展望 06 第一部分 团队与个人 ’ alt=‘OCR图片’/> 团队与个人 字节跳动程序语言团队 go 编译器/Runtime/GC 优化 基础库、性能分析工具、java、python 基础库、性能分析工具、java、python 马春辉 十多年的编译器领域相关工作经验 先后就职于HP编译器组,IBM jvm组,华为虚拟机实验室,字节跳动程序语言团队 ’ alt=‘OCR图片’/> 第二部分 GoLLVM背景 ’ alt=‘OCR图片’/> GoLLVM背景 · 字节内有大量的go微服务 性能要求 在原生Go SDK上的一些传统编译优化收益超过几十万核 PSM CPU Latency GoLLVM背景 传统编译优化在go compiler上的实现 Inline 策略调整 栈大小调整 Fast path inline Aggressive BCE ’ alt=‘OCR图片’/> GoLLVM背景 ·两条路 继续在原生Go SDK上开发 优化pass少 SSA比较简陋,缺少一些优化的基础设施 探索利用LLVM的优化能力:语言团队与STE-编译器组联合探索0 码力 | 25 页 | 3.99 MB | 1 月前3
Greenplum 编译安装和调试## Greenplum 编译安装和调试 本文先介绍如何从源代码编译安装Greenplum、初始化Greenplum集群。然后介绍SQL在Greenplum中的典型执行路径,最后介绍一些调试技巧。 源代码使用 Greenplum 开源社区最新源代码 6X_STABLE 分支: https://github.com/greenplum-db/gpdb,内核代码基于PostgreSQL 9. com/greenplum-db/gpdb-postgres-merge。 ### 1. 从源代码编译 Greenplum Greenplum 目前官方支持 Redhat/Centos/SuSE/Ubuntu 等 Linux 系统。大量开发人员包括我自己使用 Mac 系统,但是不在官方支持列表中。 ### 1.1 在 Mac 系统上编译 首先需要关闭苹果操作系统的 SIP 特性,否则无法初始化集群。 1. 重启操作系统 python get-pip.py $ sudo pip install psutil lockfile paramiko setuptools epydoc // 需要安装 openssl,否则无法编译 $ brew install openssl && brew link openssl --force $ CPPFLAGS="-I/usr/local/include/0 码力 | 15 页 | 2.07 MB | 2 年前3
C++高性能并行编程与优化 - 课件 - 04 从汇编角度看编译器优化## AMD # 从汇编角度看编译器优化 by 彭于斌 (@archibate) 往期录播:https://www.bilibili.com/video/BV1fa411r7zp 课程 PPT 和代码:https://github.com/parallel101/course  ## 高性能并行编程与优化 - 课程大纲 • 分为前半段和后半段,前半段主要介绍现代 C++,后半段主要介绍并行编程与优化。 1. 课程安排与开发环境搭建:cmake 与 git 入门 2. 现代 C++ 入门:常用 STL 容器,RAII 内存管理 3. 现代 C++ 进阶:模板元编程与函数式编程 4. 编译器如何自动优化:从汇编角度看 C++ 5. C++11 C++11 起的多线程编程:从 mutex 到无锁并行 6. 并行编程常用框架:OpenMP 与 Intel TBB 7. 被忽视的访存优化:内存带宽与 cpu 缓存机制 8. GPU 专题:wrap 调度,共享内存,barrier 9. 并行算法实战:reduce,scan,矩阵乘法等 10. 存储大规模三维数据的关键:稀疏数据结构 11. 物理仿真实战:邻居搜索表实现 pbf 流体求解0 码力 | 108 页 | 9.47 MB | 2 年前3
2.1.5 Go语言编译器简介中国 上海 / 2020-11.21-22 Go语言编译器简介 ’ alt=‘OCR图片’/> 关于我 Contributors to golang/go · GitHub 给Go编译器提交过127个补丁,累计六万余行; 拥有Go官方git仓库提交权限; 全球贡献者排名长期处于前50名; 世界上90%的gopher都用过我写的代码; 编译器的重要性 只有1%的程序员懂汇编语言 汇编语言无法构建大型系统 汇编语言无法构建大型系统 操作系统内核也需要编译器才能运行起来 编译理论是图灵奖大户,仅次于计算复杂度理论 操作系统有后门,编译器的后门更致命 编译器的难题:任务爆炸 N种语言 * M种机器 = N*M 个任务 GOPHER CHINA 2020 中国 上海 / 2020-11.21-22 两个方案 $$ N \mathrm {种 语 言} + M \mathrm {种 机 器} {个 任 务} $$ 其它语言 -> C -> 各个机器 各个语言 -> x86 -> 其它机器 GOPHER CHINA 2020 中国 上海 / 2020-11.21-22 通用(非专用)编译器的方案 AST = Abstract Syntax Tree抽象语法树 SSA = Single Static Assignment单静态赋值 IR = Intermediate Representation中间表示0 码力 | 36 页 | 1.63 MB | 1 月前3
Concurrency in RustConcurrency in Rust Alex Crichton ## What's Rust? Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety. ## Concurrency? Rust? Libraries • Deadlocks • Use after free Exploitable! • Double free Concurrency? Rust? Libraries Futures ## What's Rust? Rust is a systems programming language that runs blazingly fast, prevents segfaults auto& elem = vector[0]; vector.push_back(some_string); cout << elem; } ## Rust's Solution Ownership/Borrowing  Martin Geisler ## Contents Welcome to Comprehensive Rust 👑👑 1 Running the Course 13 1.1 Course 2.1 The Rust Ecosystem 18 2.2 Code Samples in This Training 19 2.3 Running Code Locally with Cargo 20 I Day 1: Morning 22 3 Welcome to Day 1 23 4 Hello, World 25 4.1 What is Rust? 25 4.2 2 Benefits of Rust 26 4.3 Playground 26 5 Types and Values 28 5.1 Hello, World 28 5.2 Variables 29 5.3 Values 29 5.4 Arithmetic 30 5.5 Type Inference 30 5.6 Exercise: Fibonacci 31 5.60 码力 | 378 页 | 1009.46 KB | 2 年前3
Comprehensive RustComprehensive Rust  Martin Geisler ## 차례 Comprehensive Rust 에 오신 것을 환영합니다 👑 1 강의전행 12 1.1 강의구성 13 1.2 단축키 15 1 강의에서의 코드샘플 18 2.3 로컬 환경의카고 19 I 1 일차 오전 20 3 1 일차개요 21 4 Hello World! 23 4.1 러스트란? 23 4.2 Rust 의이점 23 4.3 플레이그라운드 24 5 타입 및값 26 5.1 Hello World! 26 5.2 변수 27 5.3 값 27 5.4 연산 28 5 30.6 안전하지 않은 트레잇구현하기 182 30.7 FFI 래퍼 183 30.7.1 해답 185 IX 안드로이드 189 31 Welcome to Rust in Android 190 32 설치 191 33 빌드규칙 192 33.1 러스트라이너리 193 33.2 러스트라이브러리 193 34 AIDL0 码力 | 368 页 | 1.29 MB | 1 年前3
2021-11-22 - Rust CTCFT - Rust for Linux## Rust for Linux Miguel Ojeda Wedson Almeida Filho Alex Gaynor ## I ntroduction Rust for Linux aims to add Rust support to the Linux kernel. We believe Rust offers key improvements over C in this domain in the improvement of Rust for everyone! Language Library Tooling ## Nightly features A general priority is to stabilize them (or to find alternatives): https://github.com/Rust-for-Linux/linux/issues/2 } } ## Memory model: future potential Unified/Compatible Linux kernel and Rust memory models: No need to use inline assembly to define a new memory model. Language-supported address0 码力 | 53 页 | 332.50 KB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100













