C++高性能并行编程与优化 - 课件 - 性能优化之无分支编程 Branchless Programming性能优化 之 无分支编程 Branchless Programming by 彭于斌( @archibate ) 两种代码写法:分支 vs 三目运算符 两种使用方式:排序 vs 不排序 测试结果(均为 gcc -O3 ) 测试结果可视化 图表比较:分支 vs 无分支 分支 无分支 0 0.01 0.02 0.03 耗时(越低越好) 乱序 有序 • 传统的分支方法实现的0 码力 | 47 页 | 8.45 MB | 1 年前3
Working with Asynchrony Generically: A Tour of C++ Executorsconcurrency 2. Cancellation 3. An extended example3 GOALS FOR THE EXECUTORS PROPOSAL The vision: “An asynchronous analog of the STL” • A full suite of standard async algorithms based on real-world requirements: Libunifex: https://github.com/facebookexperimental/libunifex54 SUMMARY FROM PART 1 1. Vision: “An asynchronous analogue of the STL” 2. Some simple examples, intro to senders 3. The lifecycle of an async “Go Statement considered harmful,” by Nathaniel Smith58 IN THE BEGINNING … WAS GOTO STRUCTURED PROGRAMMING Structured control flow constructs have a single entry and a single exit, permitting them to0 码力 | 121 页 | 7.73 MB | 6 月前3
hazard pointer synchronous reclamationprotection duration (e.g., the user-defined fn is allowed to block or take long time) Asynchronous Reclamation • Asynchronous reclamation is invoked when the number of retired objects reaches some threshold: Michael Folly open-source library: github.com/facebook/folly under synchronization/Hazptr.h Is Asynchronous Reclamation Always Enough? delete ptr shutdown_resource_X() Hazard Pointer Synchronous Reclamation reclamation ~Foo() { use_resource_X (); } Foo* ptr = new Foo; Remove ptr Is Asynchronous Reclamation Always Enough? No Asynchronous reclamation: delete ptr Using unavailable resource X Hazard Pointer Synchronous0 码力 | 31 页 | 856.38 KB | 6 月前3
Rust 异步并发框架在移动端的应用 - 陈明煜chenmingyu4@huawei.com 华为 公共开发部 嵌入式软件能力中心 Applications of Rust Runtime in Mobile Overview of asynchronous Rust #1 Rust 异步简介 Ylong async runtime #3 Ylong Runtime 并发框架 目录 Table of Contents #2 社区并发框架介绍以及与移动端的不适配性 Introduction to third party Runtime crates and their incompatibility with mobile environment Rust 异步机制 Asynchronous Rust 异步并发框架是许多大型应用、系统具备的底层能力。 区别于多线程编程模型,它带来以下优势: 任务调度颗粒度更小,充分利用线程资源 更可控的线程数 单个任务资源占用:几十 await Waker asyn c Future Waker poll Syntax sugar wake await Rust 异步机制 Asynchronous Rust Rust 异步机制 Asynchronous Rust Waker Task Future task Queue wake Worker Future.poll() Reactor fd0 码力 | 25 页 | 1.64 MB | 1 年前3
使用硬件加速Tokio - 戴翔requests per second with minimal overhead. Fast async/await reduces the complexity of writing asynchronous applications. Paired with Tokio's utilities and vibrant ecosystem, writing applications is a0 码力 | 17 页 | 1.66 MB | 1 年前3
C++20: An (Almost) Complete Overviewallowed)16 Coroutines What are coroutines used for? They simplify implementing: Generators Asynchronous I/O Lazy computations Event driven applications17 Coroutines C++20 contains language0 码力 | 85 页 | 512.18 KB | 6 月前3
No Silver Bullet – Essence and Accident in Software Engineeringabstract software entity, and accidental tasks, the representation of the abstract entities in programming languages and the mapping of these onto machine languages within space and speed constraints have made the accidental tasks inordinately hard, such as severe hardware constraints, awkward programming languages, lack of machine time. How much of what software engineers now do is still devoted • Preserves immediacy, and hence enables us to maintain an overview of complexity • Unified programming environment • They attack the accidental difficulties of using tools togetherHopes for the Silver“Now0 码力 | 35 页 | 1.43 MB | 6 月前3
RustBelt - Rust 的形式化语义模型Foundations of the Rust Programming Language. In POPL 2018: ACM SIGPLAN Symposium on Principles of Programming Languages Ralf Jung. Understanding and Evolving the Rust Programming Language. PhD dissertation Dissertation Award Recipient of the 2021 Otto Hahn Medal Ralf Jung Assistant professor, Institute for Programming Languages and Systems, ETH Zürich RustBelt Project Background Iris: A Higher-Order Concurrent Concurrent Separation Logic Framework RustBelt: Securing the Foundations of the Rust Programming Language Coq Proof Assistant: A Formal Proof Management System built on top of built on top of Rust Types0 码力 | 21 页 | 2.63 MB | 1 年前3
Learning by Contributing to Rust Compiler - 陈于康now Cryptape Rust My work experience • Strongly interested in programming languages implementation • My solutions to EOPL My experience • 2014 ~ 2018 Some small 年写一本编程语言实现的书 Crafting Interpreters • Essentials of Programming Languages • rui314/9cc: A Small C Compiler Great resources for programming languages Thank you !0 码力 | 23 页 | 3.28 MB | 1 年前3
基于Rust-vmm实现Kubernetes运行时to C • Memory management without garbage collection • Designed for systems programming Rust is a multi-paradigm programming language focused on performance and safety, especially safe concurrency. empty0 码力 | 27 页 | 34.17 MB | 1 年前3
共 20 条
- 1
- 2













