Commit 9a7c4bfe authored by Aleksey Kozyatinskiy's avatar Aleksey Kozyatinskiy Committed by Commit Bot

Revert "[elements] Improve Array.prototype.splice speed"

This reverts commit dcdabdc8.

Reason for revert: broke tsan.

Original change's description:
> [elements] Improve Array.prototype.splice speed
> 
> By using memmove for SMI elements we get a roughly 3x speedup over the slower
> iterative copying with write barriers.
> 
> Bug: chromium:835558
> Change-Id: I73da07a1648a3495ff78212ffa1ed949d205a7d2
> Reviewed-on: https://chromium-review.googlesource.com/1028236
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52792}

TBR=cbruni@chromium.org,ishell@chromium.org

Change-Id: I77c46fe3d47d651de3c39df9fbf5f30c340188e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:835558
Reviewed-on: https://chromium-review.googlesource.com/1028337Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52795}
parent 9166affb
...@@ -2298,9 +2298,6 @@ class FastElementsAccessor : public ElementsAccessorBase<Subclass, KindTraits> { ...@@ -2298,9 +2298,6 @@ class FastElementsAccessor : public ElementsAccessorBase<Subclass, KindTraits> {
if (IsDoubleElementsKind(KindTraits::Kind)) { if (IsDoubleElementsKind(KindTraits::Kind)) {
MemMove(dst_elms->data_start() + dst_index, MemMove(dst_elms->data_start() + dst_index,
dst_elms->data_start() + src_index, len * kDoubleSize); dst_elms->data_start() + src_index, len * kDoubleSize);
} else if (IsSmiElementsKind(KindTraits::Kind)) {
MemMove(dst_elms->data_start() + dst_index,
dst_elms->data_start() + src_index, len * kPointerSize);
} else { } else {
DisallowHeapAllocation no_gc; DisallowHeapAllocation no_gc;
heap->MoveElements(FixedArray::cast(*dst_elms), dst_index, src_index, heap->MoveElements(FixedArray::cast(*dst_elms), dst_index, src_index,
......
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