Hidden Overhead of a Function APIperformance, we typically think about the function logic. We’ll see that a well designed function API can have an even larger impact.How will we compare performance? ● Benchmarks at this low level are advance(RandIter& iter, Diff n, random_access_iterator_tag) { iter += n; } ● Access token to make some API available only inside the library (like the default “package private” access modifier in Java) Empty0 码力 | 158 页 | 2.46 MB | 6 月前3
GraphBLAS: Building a C++ Matrix API for Graph Algorithmsthe important data structures and concepts? Prior work in the GraphBLAS community, C API Overview of our draft C++ API How might this interoperate with standard C++, graph library proposal? 4[DISTRIBUTION the important data structures and concepts? Prior work in the GraphBLAS community, C API Overview of our draft C++ API How might this interoperate with standard C++, graph library proposal? 5[DISTRIBUTION the important data structures and concepts? Prior work in the GraphBLAS community, C API Overview of our draft C++ API How might this interoperate with standard C++, graph library proposal? 6[DISTRIBUTION0 码力 | 172 页 | 7.40 MB | 6 月前3
Noexcept: Enabling Testing of Contract Checksimportance of writing contracts and checking them at run time • How to unit test contract-checking annotations (CCAs) • How noexcept interacts with unit testing of CCAs. We will go over everything twice! ASSERTION FAILURE: Precondition violation Postcondition will always fail!Contract-checking Annotations (CCAs) • The C assert macro in theheader • Homebrew or 3rd party macro libraries • • PRECONDITION(cond), POSTCONDITION(cond) • ASSERT(cond) • Upcoming C++ contract annotations (study group 21) • [[pre: cond]], [[post: cond]] or pre{cond}, post{cond} • [[assert: cond]] or assert {cond 0 码力 | 90 页 | 1.38 MB | 6 月前3
Tracy: A Profiler You Don't Want to Missmessages mostly for debugging: not necessarily concerned with performance Instrumentation code annotations (markup) Analysis pre-recorded? | real-time? log files? | command-line tool? | GUI?, … An interactive messages mostly for debugging: not necessarily concerned with performance Instrumentation code annotations Analysis pre-recorded? | real-time? log files? | command-line tool? | GUI?, … 12 Closing the Waits • Sleeps • Lock acquisition (contention) • Memory operations • Explicit system calls (or heavy API calls) • Big-O activity (high-level) • I/O activity • Unpredictable events usually a good thing!0 码力 | 84 页 | 8.70 MB | 6 月前3
Tracy: A Profiler You Don't Want to Missmessages mostly for debugging: not necessarily concerned with performance Instrumentation code annotations (markup) Analysis pre-recorded? | real-time? log files? | command-line tool? | GUI?, … An interactive messages mostly for debugging: not necessarily concerned with performance Instrumentation code annotations (markup) Analysis pre-recorded? | real-time? log files? | command-line tool? | GUI?, … 12 Waits • Sleeps • Lock acquisition (contention) • Memory operations • Explicit system calls (or heavy API calls) • Big-O activity (high-level) • I/O activity • Unpredictable events usually a good thing!0 码力 | 85 页 | 6.51 MB | 6 月前3
Contracts for C++formal proofs optimisation safety diagnose bugs security correctness tooling support annotations debugging expressivity performance40 Copyright (c) Timur Doumler | @timur_audio | with configurable checks of its correctness, thereby helping to diagnose and fix bugs, across API boundaries. – Timur Doumler44 Copyright (c) Timur Doumler | @timur_audio | https://timur with configurable checks of its correctness, thereby helping to diagnose and fix bugs, across API boundaries. – Timur Doumler45 Copyright (c) Timur Doumler | @timur_audio | https://timur0 码力 | 181 页 | 4.44 MB | 6 月前3
Embracing an Adversarial Mindset for Cpp Security0x7a00CVE-2023-28252 Exploitation 6. Call AddLogContainer with the handle of the trigger .blf • AddLogContainer api using the handle of the trigger blf after CreateLogFile • pwszContainerPath = C:\Users\Public\MyLog the heap in the dwm.exe • Attacker controlled data at a controlled offset using DirectComposition API 1. storageOffset == this- >properties[propertyId]->offset & 0x1FFFFFFF 2. this->properties[propertyId]->type nned-api-usage-use-updated-function-replacementIntegrating Security into the Development Workflow Microsoft Security DevOps has these built in ● BinSkim ● CodeQL ● PreFast and SAL annotations ● OASIS0 码力 | 92 页 | 3.67 MB | 6 月前3
Code Analysis++thing != good language.” Twitter, @ArenMook, 24 Dec 2018 “With a sufficient number of uses of an API, it does not matter what you promise in the contract: all observable behaviours of your system will & Pointer ○ Built-in compiler check ○ Current LLVM implementation gives 5% overhead ○ Annotations to help analysis: gsl::SharedOwner, gsl::Owner, gsl::Pointer void sample1() { int* p =0 码力 | 61 页 | 2.70 MB | 6 月前3
Lifetime Safety in C++: Past, Present and FutureSafety Profile Crubit: Adopting Rust’s Type System P2771: Thomas Neumann’s Dependency Annotations Hylo (formerly Val): Mutable Value SemanticsFuture of C++? C++ Core Guidelines’ Lifetime Safety Profile Crubit: Adopting Rust’s Type System P2771: Thomas Neumann’s Dependency Annotations Vale: Generational References + Simplified borrowing Hylo (formerly Val): Mutable Value Safety Profile Crubit: Adopting Rust’s Type System P2771: Thomas Neumann’s Dependency Annotations Vale: Generational References + Simplified borrowing Hylo (formerly Val): Mutable Value0 码力 | 124 页 | 2.03 MB | 6 月前3
Peering Forward: C++'s Next Decadecoding patterns to declare “what” vs “how” use the intent already in the code, instead of “how” annotations “Inside C++, there is a much smaller and cleaner language struggling to get out.” — B. Stroustrup coding patterns to declare “what” vs “how” use the intent already in the code, instead of “how” annotations “Inside C++, there is a much smaller and cleaner language struggling to get out.” — B. Stroustrup0 码力 | 84 页 | 6.21 MB | 6 月前3
共 193 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20













