commit | 25fb2ec8ee2678756fb8505d81f08d7338a4559f | [log] [tgz] |
---|---|---|
author | adonovan <adonovan@google.com> | Mon Apr 20 08:32:14 2020 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Apr 20 08:33:27 2020 -0700 |
tree | 76ac35de87ce7d9bf25081300b1d651662a9d285 | |
parent | 1c7483d9530cd4d7c8f3c9468f4ae1dd8606ea67 [diff] |
bazel syntax: reduce stack usage in evaluator recursion This change breaks each case in the doEval(Expression) switch into a separate child function to reduce the stack required by a recursive call to eval. The frame size of a switch is that of its largest case, so deeply nested expressions such as a+...+z consume much more stack than necessary for a mere addition. Empirically this causes stack overflow to occur at a recursion depth of around 20K additions, up from around 3K before this change. BUG=153764542 PiperOrigin-RevId: 307403954
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
See CONTRIBUTING.md