Commit e771fb28 authored by Dale Curtis's avatar Dale Curtis Committed by Commit Bot

Switch to using alloca() instead of VLA for libopus.

Variably length arrays tend be less efficient than alloca(); see
https://www.phoronix.com/scan.php?page=news_item&px=Linux-Kills-The-VLA

BUG=none
TEST=cq
R=sergeyu

Change-Id: Ibb16415b960b1ab5b262fab39537c7cf63ce5586
Reviewed-on: https://chromium-review.googlesource.com/c/1324196
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarSergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606197}
parent 475f5490
......@@ -35,6 +35,11 @@ config("opus_private_config") {
defines = [
"OPUS_BUILD",
"OPUS_EXPORT=",
# Prefer alloca() over variable length arrays which are often inefficient;
# the opus code will automatically handle this correctly per-platform.
"USE_ALLOCA",
"HAVE_ALLOCA_H"
]
include_dirs = [
......@@ -47,7 +52,6 @@ config("opus_private_config") {
if (is_win) {
defines += [
"USE_ALLOCA",
"inline=__inline",
]
......@@ -59,7 +63,6 @@ config("opus_private_config") {
defines += [
"HAVE_LRINT",
"HAVE_LRINTF",
"VAR_ARRAYS",
]
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment