Official NativeScript Plugin Seed
Official NativeScript Plugin Seed0 码力 | 92 页 | 15.00 MB | 1 年前3C++高性能并行编程与优化 - 课件 - 17 由浅入深学习 map 容器
由浅入深学习 map 容器 by 彭于斌( @archibate ) 我负责监督你鞋习 ! 我负责监督你鞋习 ! 本期看点: 用方括号 [ ] 取出 map 元素居然是错误的! 能不能在遍历的同时删除元素?安全吗? emplace , emplace_hint , try_emplace 的区别? 课程安排 1. vector 容器初体验 & 迭代器入门 (BV1qF411T7sd) 2 set 容器 & 迭代器分类 (BV1m34y157wb) 3. string , string_view , const char * 的爱恨纠葛 (BV1ja411M7Di) 4. 万能的 map 容器全家桶及其妙用举例 ( 本期 ) 5. 函子 functor 与 lambda 表达式知多少 6. 通过实战案例来学习 STL 算法库 7. C++ 标准输入输出流 & 字符串格式化 8. traits 第一章:读取与写入 我负责监督你鞋习 ! 我负责监督你鞋习 ! map 查找元素的两个接口 • map 提供了两个查找元素的接口,一曰 [] ,二曰 at 。 • 那么他们两个又有什么区别呢?很多新手都分不清他俩,可能只认识 [] 。 读取 map 元素 • mapm; • 读取 map 中指定键值的元素有两种方法。 • val = m[“key”]; 0 码力 | 90 页 | 8.76 MB | 1 年前3nativescript-new-looper-vantoll.pptx
nativescript-google-maps-sdk (5,266) • Dan Prietti - 5) ? nativescript-spotify (5,295) - Nathan Walker and Brad Martin - 4) ? nativescript-slides (5,436) - Josh Sommer - 3) ? nativescript-plugin-firebase nt (8,066) - Marcel Kloubert - 1) ? nativescript-toolbox (10,772) - Marcel Kloubert Top Plugin Creators • 6) ? Nathan Walker (9) • 5) ? Osei Fortune (11) • 4) ? Eddy Verbruggen (14) • 3)0 码力 | 36 页 | 10.78 MB | 1 年前3C++高性能并行编程与优化 - 课件 - 性能优化之无分支编程 Branchless Programming
动返回缺省值的效果。 对于自变量不连续的情况:查表法需要从数组变成 map • 不过把 lut 作为数组的方法只适用于自变量 x 连 续变化的情况,如果不连续,则只好采用 map 查表了(相当于 Python 的字典)。 • 不过 map 的查找开销更大,复杂度为 O(logn) ,比线性数组的 O(1) 要坏一点点。 • 所以采用 map 也可能导致反而比暴力 if-else 更 低效,也可能高效,要测试才知道。 低效,也可能高效,要测试才知道。 • 抛开性能不谈,从可读性和可维护性上来 说, map 是完胜的,不再需要重复打字 } else if (...) { 了,因此我仍十分推荐用 map 。 不得不分支时可以采取的优化手段: likely 和 unlikely 除了 if-else 分支之外:函数指针也是一种分支,也有预判的开销 • 函数调用相当于无条件跳转指令: jmp label 或者说 call com/p/53394807 • CMake 锐评家 https://www.coder.work/article/7298665 • 谷歌性能测试框架 https://github.com/google/benchmark0 码力 | 47 页 | 8.45 MB | 1 年前3C++高性能并行编程与优化 - 课件 - 06 TBB 开启的并行编程之旅
数量超过了 CPU 核心数量,通常就无法再加速了,这就是为什么要买更多核的电脑。 • 也有一种说法,认为要用 c 趋向于无穷时的时间复杂度来衡量,比如 O(n/c) 应该变成 O(1) 。 映射( map ) 1 个线程,独自处理 8 个元素的映射,花了 8 秒 用电量: 1*8=8 度电 结论:串行映射的时间复杂度为 O(n) ,工作复杂度为 O(n) ,其中 n 是元素个数 并行映射 4 个线程,每人处理 可见,并行后虽然降低了时间复杂度,但是以提升工作复杂度为代价! 更多细节,敬请期待 GPU 专题,我们会以 CUDA 为例详细探讨两全方案。 封装好了: parallel_scan 第 3 章:性能测试 案例: map 与 reduce 的组合 测试所花费时间: tbb::tick_count::now() 并行和串行的速度比较 如何评价 • 公式:加速比 = 串行用时 ÷ 并行用时 • 理想加速比应该是核心的数量。 这种只用了简单的加法,瓶颈在内存的算法起了作用。 • 而本例中 for 部分用了 std::sin ,需要做大量数学运算,因此瓶颈在 ALU 。 • 这里卖个关子,欲知后事如何,请待下集揭晓! 更专业的性能测试框架: Google benchmark • 手动计算时间差有点太硬核了,而且只运 行一次的结果可能不准确,最好是多次运 行取平均值才行。 • 因此可以利用谷歌提供的这个框架。 • 只需将你要测试的代码放在他的0 码力 | 116 页 | 15.85 MB | 1 年前3Analyzing MySQL Logs with ClickHouse
Percona. 19 Percona Server Configuration • Install Audit Plugin • INSTALL PLUGIN audit_log SONAME 'audit_log.so'; • Configure Audit Plugin • audit_log_format=JSON • audit_log_rotate_on_size=1G •0 码力 | 43 页 | 2.70 MB | 1 年前3NativeScript 101
UI JavaScript Engine (Your app code runs here) Native APIs API Wrapper API Wrapper Plugin s Plugin s API Wrapper API Wrapper API Wrapper API Wrapper • Plugins created with JS/TypeScript setup to build for iOS/Android (requires Mac for iOS) o Integrates with Visual Studio Code (via plugin) WHY: More control, Free, Integrate with existing IDEs/code editors WHO: More technical developers0 码力 | 90 页 | 40.11 MB | 1 年前3NativeScript UI
@tjvantoll Agenda • Introduce {N} UI • Demo ? • Raucous applause ?? What is {N} UI? • A NativeScript plugin • 7 UI components • Supports Angular and non-Angular usage. • Used to have free and paid tiers—now0 码力 | 22 页 | 1.91 MB | 1 年前3基于Rust-vmm实现Kubernetes运行时
https://kccncchina2018english.sched.com/event/FuLz/layers-of-isolation-in-kubernetes-tim-allclair-google Kubernetes has many layers of isolation, but we will focus on pod-to-pod isolation in this talk Runc Yes Yes Golang Yes No Yes None Docker gVisor+runsc Yes Yes Golang Yes No No None or KVM Google Kata+qemu Yes Yes Golang, C Yes Yes Yes KVM Hyper Firecracker+ Firecracker- containerd No Yes storage and OS environments • High-performance: Leverage KVM capability Advantage of Rust-VMM • Google implements the first Rust-based light VMM called CrosVM which is in Fuchsia operating system •0 码力 | 27 页 | 34.17 MB | 1 年前3Introduction to Mobile UI Test Automation
driver.compareScreen("page.png"); Open source cloud builds - Sauce Labs nativescript-facebook plugin: www.github.com/NativeScript/nativescript-facebook/blob /master/demo/e2e-tests/tests.js Integration0 码力 | 41 页 | 4.75 MB | 1 年前3
共 36 条
- 1
- 2
- 3
- 4