Performance Engineering: Being Friendly to Your Hardware• Gets next block of (partial) instructions • Linear fetch • Incoming branch • Instruction alignment • Instruction fusing ## Branch prediction Branching Fetch • Governs fetching of next instruction characteristics  • Alignment: source and destination • Size • Direction • Linearity ## Example – memcpy: scalar naive void0 码力 | 111 页 | 2.23 MB | 1 年前3
Programmer’s Guide for Free Pascal, Version 3.2.2convention 17 1.2.8 $CHECKPOINTER : Check pointer values 17 1.2.9 $CODEALIGN : Set the code alignment 18 1.2.10 $COPERATORS : Allow C like operators 18 1.2.11 $DEFINE or $DEFINEC : Define a symbol . 34 1.2.59 $PACKENUM or $Z : Minimum enumeration type size ..... 36 1.2.60 $PACKRECORDS : Alignment of record elements ..... 36 1.2.61 $PACKSET : Specify set size ..... 37 1.2.62 $POP : Restore 680x0 standard routine prolog / epilog ..... 88 6.7 Parameter passing ..... 88 6.7.1 Parameter alignment ..... 89 6.8 Stack limitations ..... 89 7 Linking issues ..... 90 7.1 Using external code0 码力 | 187 页 | 531.58 KB | 2 年前3
The Zig Programming Language 0.2.0 Documentationpointers...0K Test 7/8 pointer casting...0K Test 8/8 pointer child type...0K ## Alignment Each type has an alignment – a number of bytes such that, when a value of the type is loaded from or stored to type. Alignment depends on the CPU architecture, but is always a power of two, and less than 1 << 29. In Zig, a pointer type has an alignment value. If the value is equal to the alignment of the @import("std").debug.assert; const builtin = @import("builtin"); test "variable alignment" { var x: i32 = 1234; const align_of_i32 = @alignOf(@typeOf(x)); assert(@typeOf(&x)0 码力 | 117 页 | 2.84 MB | 2 年前3
The Zig Programming Language 0.12.0 Documentationost/lib/zig/std/array_list.zig:457:67: const new_memory = try self. allocator. alignedAlloc(T, alignment, new_ca); /home/ci/actions-runner/_work/zig-bootstrap/out/host/lib/zig/std/array_list.zig:434:51: 2/2 test_pointer_casting.test.pointer child type... OK All 2 tests passed. ## Alignment Each type has an alignment - a number of bytes such that, when a value of the type is loaded from or stored to type. Alignment depends on the CPU architecture, but is always a power of two, and less than 1 << 29. In Zig, a pointer type has an alignment value. If the value is equal to the alignment of the0 码力 | 241 页 | 7.37 MB | 2 年前3
The Zig Programming Language 0.3.0 Documentation7/8 pointer casting...0K Test 8/8 pointer child type...0K All tests passed. ## Alignment Each type has an alignment – a number of bytes such that, when a value of the type is loaded from or stored to type. Alignment depends on the CPU architecture, but is always a power of two, and less than 1 << 29. In Zig, a pointer type has an alignment value. If the value is equal to the alignment of the @import("std").debug.assert; const builtin = @import("builtin"); test "variable alignment" { var x: i32 = 1234; const align_of_i32 = @alignOf(@typeOf(x)); assert(@typeOf(&x)0 码力 | 175 页 | 4.08 MB | 2 年前3
The Zig Programming Language 0.4.0 DocumentationOperators - Precedence - Arrays - Vectors - SIMD - Pointers - volatile - Alignment - allowzero - Slices - struct - extern struct - packed struct - struct Naming - Invalid Error Code - Invalid Enum Cast - Invalid Error Set Cast - Incorrect Pointer Alignment - Wrong Union Field Access - Out of Bounds Float to Integer Cast - Pointer Cast Invalid Test 1/2 pointer casting...OK Test 2/2 pointer child type...OK All tests passed. ## Alignment Each type has an alignment - a number of bytes such that, when a value of the type is loaded from or stored to0 码力 | 207 页 | 5.29 MB | 2 年前3
The Zig Programming Language 0.11.0 Documentation/host/lib/zig/std/array_list.zig:403:67: const new_memory = try self.allocator.alignedAlloc(T, alignment, new_ca /home/ci/actions-runner/_work/zig-bootstrap/out/host/lib/zig/std/array_list.zig:379:51: pointer casting... OK 2/2 test.pointer child type... OK All 2 tests passed. #### 13.2. Alignment Each type has an alignment - a number of bytes such that, when a value of the type is loaded from or stored to type. Alignment depends on the CPU architecture, but is always a power of two, and less than 1 << 29. In Zig, a pointer type has an alignment value. If the value is equal to the alignment of the0 码力 | 238 页 | 7.80 MB | 2 年前3
The Zig Programming Language 0.1.1 Documentationpointers...OK Test 7/8 pointer casting...OK Test 8/8 pointer child type...OK ## Alignment Each type has an alignment – a number of bytes such that, when a value of the type is loaded from or stored to type. Alignment depends on the CPU architecture, but is always a power of two, and less than 1 << 29. In Zig, a pointer type has an alignment value. If the value is equal to the alignment of the @import("std").debug.assert; const builtin = @import("builtin"); test "variable alignment" { var x: i32 = 1234; const align_of_i32 = @alignOf(@typeOf(x)); assert(@typeOf(&x)0 码力 | 82 页 | 2.67 MB | 2 年前3
The Zig Programming Language 0.5.0 DocumentationPrecedence - Arrays - Multidimensional Arrays - Vectors - SIMD - Pointers - volatile - Alignment - allowzero - Slices - struct - Default Field Values - extern struct - packed Invalid Error Code Invalid Enum Cast Invalid Error Set Cast Incorrect Pointer Alignment Wrong Union Field Access Out of Bounds Float to Integer Cast Pointer Cast Invalid casting"...OK 2/2 test "pointer child type"...OK All tests passed. ## Alignment Each type has an alignment - a number of bytes such that, when a value of the type is loaded from or stored to0 码力 | 224 页 | 5.80 MB | 2 年前3
The Zig Programming Language 0.9.1 Documentationcasting"... OK 3 2/2 test "pointer child type"... OK 4 All 2 tests passed. ## Alignment Each type has an alignment - a number of bytes such that, when a value of the type is loaded from or stored to type. Alignment depends on the CPU architecture, but is always a power of two, and less than 1 << 29. In Zig, a pointer type has an alignment value. If the value is equal to the alignment of the from the type: variable_alignment.zig const std = @import("std"); const builtin = @import("builtin"); const expect = std.testing.expect; test "variable alignment" { var x: i320 码力 | 234 页 | 7.90 MB | 2 年前3
共 913 条
- 1
- 2
- 3
- 4
- 5
- 6
- 92
相关搜索词
Performance EngineeringHardwareMemcpyAlignmentPerformance TestingFree Pascal编译器指令内存模型数据格式MMX支持Zig编程语言编译时参数泛型数据结构命名约定安全检查Zig LanguageStandard LibraryC InteropTestingBuild SystemZigcompilerbuild optionserror handlingcross-platform内存分配错误处理指针数组文档Zig语言标准库内联汇编构建系统交叉平台切片结构体内存管理分配器接口堆分配失败递归所有权与生命周期所有权测试风格指南













