# compile time improvement \- move bounds checking to function calls · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/13c6a58a61817ae6aae66dd1843385452fe65bd1)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 13c6a58a61817ae6aae66dd1843385452fe65bd1

Requested commit: 13c6a58a61817ae6aae66dd1843385452fe65bd1

Commit: 13c6a58a61817ae6aae66dd1843385452fe65bd1

Tree: 6ac0236d6aba9740a36addb192fa639446457518

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
compile time improvement - move bounds checking to function calls

once again this barely had an effect:

Before:

./build size: 1.3 MB
hello.zig size: 301 KB
full test: 1m31.253s
debug test: 19.607s
hello.zig timing:
                Name       Start         End    Duration     Percent
          Initialize      0.0000      0.0000      0.0000      0.0002
   Semantic Analysis      0.0000      0.0431      0.0431      0.2262
     Code Generation      0.0431      0.0660      0.0229      0.1201
    LLVM Emit Object      0.0660      0.1765      0.1105      0.5795
  Build Dependencies      0.1765      0.1890      0.0125      0.0655
           LLVM Link      0.1890      0.1906      0.0016      0.0086
         Generate .h      0.1906      0.1906      0.0000      0.0000
               Total      0.0000      0.1906      0.1906      1.0000

After:

./build size: 1.3 MB
hello.zig size: 300 KB
full test: 1m31.882s
debug test: 19.569s
hello.zig timing:
                Name       Start         End    Duration     Percent
          Initialize      0.0000      0.0000      0.0000      0.0002
   Semantic Analysis      0.0000      0.0425      0.0424      0.2228
     Code Generation      0.0425      0.0661      0.0236      0.1239
    LLVM Emit Object      0.0661      0.1762      0.1101      0.5782
  Build Dependencies      0.1762      0.1888      0.0126      0.0664
           LLVM Link      0.1888      0.1905      0.0016      0.0085
         Generate .h      0.1905      0.1905      0.0000      0.0000
               Total      0.0000      0.1905      0.1905      1.0000

```

## Parents

- [8614397110595e267b7e4e1f558bfce619e60c02](https://git.cafe/gitcafe/zig/commit/8614397110595e267b7e4e1f558bfce619e60c02?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/13c6a58a61817ae6aae66dd1843385452fe65bd1?format=markdown)
