If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Array operations appear not to be optimized for empty arrays

NEW
Unassigned

Status

()

Core
JavaScript Engine
3 years ago
a year ago

People

(Reporter: SkyLined, Unassigned)

Tracking

35 Branch
x86_64
Windows 8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 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

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

Updated

a year ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.