Summary:
The constants table contains a concatenation of the variable-length encodings of
each constant used in the serialized component. Previously, we referenced the
constants in the code by index into the constants table, which requires reading
potentially the entire constants table to dereference. Now, we refer to the
constant by the binary offset into the constants table, which allows us to peek
into it in constant time.
Test Plan:
The constants table is used by all the precompiler modes, so the new encoding
will inherit the coverage of the existing encoding.
Results from debug and release precompiler bots are available under the
"cl-linux-try" button.
Change-Id: I4782bc0035d0b0cbd5bd6b9d086561ea601286c8
Reviewed-on: https://dart-review.googlesource.com/55470
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit 3ad4bff4e7.
Reason for revert: failures in language_2/cyclic_type_test/03
Original change's description:
> [VM] Use quadratic probing in hash_table.h
>
> On my workload this reduces the probing by 19% for the CanonicalType
> table, and reduces the number of insertions that take 25 probes or
> more by 74%. Max load is reduced from 0.75 to 0.71. The size is now
> a power of 2 so we can use masking instead of integer division, and
> we use quadratic probing in order to reduce clustering.
>
> R=kustermann@google.com
>
> Change-Id: I806197680a839dac99b7c7f5f09d2bce4d015235
> Reviewed-on: https://dart-review.googlesource.com/34760
> Commit-Queue: Erik Corry <erikcorry@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
TBR=kustermann@google.com,erikcorry@google.com
Change-Id: If1b917d5b8200add80ddfcc7427b134bfb1bee38
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/35320
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
On my workload this reduces the probing by 19% for the CanonicalType
table, and reduces the number of insertions that take 25 probes or
more by 74%. Max load is reduced from 0.75 to 0.71. The size is now
a power of 2 so we can use masking instead of integer division, and
we use quadratic probing in order to reduce clustering.
R=kustermann@google.com
Change-Id: I806197680a839dac99b7c7f5f09d2bce4d015235
Reviewed-on: https://dart-review.googlesource.com/34760
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
The counters for growing and collisions are not needed otherwise.
This avoid data races on concurrent reads (which would previously
update the counters, even if reporting is disabled)
BUG=
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2575913002 .
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER
This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.
R=asiva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/2450713004 .
This CL removes the use of STL map from freelist.cc by adding
MallocDirectChainedHashMap in hash_map.h and adding an iterator for
BaseDirectChainedHashMap there.
It also removes a use of STL map from hash_table.h that was dead code.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2083103002 .
- Do not create/add function when looking them up in TryCreatICData
- Do not allow background compilation to add/remove functions
- Cache function hash array as it may change or be set to null.
Check VMObject only if FLAG_verify_handles is true.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1709273003 .
A combination of two independent interface changes:
1. Constructor takes a RawArray* and allocates its own Array handle.
2. Release provides access to the entire handle, rather than just the raw.
This results in a very clean usage pattern, like:
FooTable table(get_foo_table());
table.Insert(obj);
...
set_foo_table(table.Release());
Having the isolate inside HashTable also allows faster allocation of temporary handles.
R=iposva@google.com
Review URL: https://codereview.chromium.org//428273002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38794 260f80e4-7a28-3924-810f-c04153c831b5
(Patch Set 1 is identical to r37716; Patch Set 2 renames some typedefs to avoid confusing MSVC)
Highly customizable to support various internal uses as well as the basis for user-level classes.
Use in Library's resolved names cache.
Next step is to add new instance classes for the user-level maps/sets (akin to GrowableObjectArray).
TBR=asiva@google.com
Review URL: https://codereview.chromium.org//348313005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37800 260f80e4-7a28-3924-810f-c04153c831b5