Array operations appear not to be optimized for empty arrays

RESOLVED DUPLICATE of bug 1088189

Status

()

RESOLVED DUPLICATE of bug 1088189
4 years ago
a year ago

People

(Reporter: abbGZcvu_bugzilla.mozilla.org, Unassigned)

Tracking

35 Branch
x86_64
Windows 8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
Build ID: 20150108202552

Steps to reproduce:

Certain operations appear not to be optimized for empty arrays, eg.

new Array(0x4000000).reverse()

new Array(0x4000000).sort()

new Array(0x4000000).join("")



Actual results:

Code uses 100% CPU for a while.


Expected results:

Code should return almost instantly. (Compare Google's V8)
(Reporter)

Updated

4 years ago
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
(Reporter)

Updated

3 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1088189
You need to log in before you can comment on or make changes to this bug.