From c7865d521027c4d5c8dd307b5f3be696c1956228 Mon Sep 17 00:00:00 2001 From: laurentlb Date: Tue, 24 Jul 2018 09:34:23 -0700 Subject: Update comments Comments are misleading, as discussed on https://github.com/bazelbuild/bazel/pull/5305#issuecomment-396288826 RELNOTES: None. PiperOrigin-RevId: 205841782 --- .../java/com/google/devtools/build/lib/syntax/Identifier.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/syntax') diff --git a/src/main/java/com/google/devtools/build/lib/syntax/Identifier.java b/src/main/java/com/google/devtools/build/lib/syntax/Identifier.java index a4e7a9ecc0..e2bd0e351f 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/Identifier.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/Identifier.java @@ -19,13 +19,9 @@ import java.io.IOException; import java.util.Set; import javax.annotation.Nullable; -// TODO(bazel-team): for extra performance: -// (1) intern the strings, so we can use == to compare, and have .equals use the assumption. -// Then have Argument and Parameter use Identifier again instead of String as keys. -// (2) Use Identifier, not String, as keys in the Environment, which will be cleaner. -// (3) For performance, avoid doing HashMap lookups at runtime, and compile local variable access -// into array reference with a constant index. Variable lookups are currently a speed bottleneck, -// as previously measured in an experiment. +// TODO(bazel-team): For performance, avoid doing HashMap lookups at runtime, and compile local +// variable access into array reference with a constant index. Variable lookups are currently a +// speed bottleneck, as previously measured in an experiment. /** * Syntax node for an identifier. * -- cgit v1.2.3