Skip to content

Commit 210d58a

Browse files
committed
overview: some rewordings
1 parent 25cf5a6 commit 210d58a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

content/en-US/learn/overview.smd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Zig has four [build modes](https://ziglang.org/documentation/master/#Build-Mode)
3636

3737
| Parameter | [Debug](https://ziglang.org/documentation/master/#Debug) | [ReleaseSafe](https://ziglang.org/documentation/master/#ReleaseSafe) | [ReleaseFast](https://ziglang.org/documentation/master/#ReleaseFast) | [ReleaseSmall](https://ziglang.org/documentation/master/#ReleaseSmall) |
3838
|-----------|-------|-------------|-------------|--------------|
39-
Optimizations - improve speed, harm debugging, harm compile time | | -O3 | -O3| -Os |
39+
Optimizations - improve speed, harm debugging, harm compile time | | On | On | On |
4040
Runtime Safety Checks - harm speed, harm size, crash instead of undefined behavior | On | On | | |
4141

4242
Here is what [Integer Overflow](https://ziglang.org/documentation/master/#Integer-Overflow) looks like at compile time, regardless of the build mode:
@@ -58,11 +58,11 @@ Zig uses [undefined behavior](https://ziglang.org/documentation/master/#Undefine
5858

5959
Speaking of performance, Zig is faster than C.
6060

61-
- The reference implementation uses LLVM as a backend for state of the art optimizations.
62-
- What other projects call "Link Time Optimization" Zig does automatically.
63-
- For native targets, advanced CPU features are enabled (-march=native), thanks to the fact that [Cross-compiling is a first-class use case](#cross-compiling-is-a-first-class-use-case).
64-
- Carefully chosen undefined behavior. For example, in Zig both signed and unsigned integers have undefined behavior on overflow, contrasted to only signed integers in C. This [facilitates optimizations that are not available in C](https://godbolt.org/z/n_nLEU).
61+
- All Zig code lives in one compilation unit, optimized together.
62+
- Carefully chosen illegal behavior. For example, in Zig both signed and unsigned integers have illegal behavior on overflow, contrasted to only signed integers in C. This [facilitates optimizations that are not available in C](https://godbolt.org/z/n_nLEU).
6563
- Zig directly exposes a [SIMD vector type](https://ziglang.org/documentation/master/#Vectors), making it easy to write portable vectorized code.
64+
- The standard library provides essential data structures such as hash maps and array lists, whereas in C it is tempting to use linked lists for simplicity.
65+
- Advanced CPU features are enabled by default, unless [cross-compiling](#cross-compiling-is-a-first-class-use-case).
6666

6767
Please note that Zig is not a fully safe language. For those interested in following Zig's safety story, subscribe to these issues:
6868

0 commit comments

Comments
 (0)