Closed
Bug 203151
Opened 22 years ago
Closed 22 years ago
array performance test problem using reals as indices
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: ash, Assigned: khanson)
References
Details
(Keywords: perf)
Attachments
(1 file, 1 obsolete file)
221 bytes,
text/plain
|
Details |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313
As i mentioned in bug 171262, I'm doing some performance testing of spidermonkey
1.5 rc5. One of my tests creates a 10*1024*1024 element array with integer
indices. It uses 400M, takes minutes, but eventually completes successfully. A
similar test uses real indices, i.e., numbers like i + .1, where i is an
integer, and creates an array with only 1024*1024 elements. It says:
[ash@localhost hash-time]$ ~/code/js/src/Linux_All_DBG.OBJ/js test.js
test.js:4: out of memory
after using only about 100M on the same system, i.e., when it's not true that
there's no more memory.
It seems like this test case should complete successfully, since it has fewer
elements, so i think this is a bug.
Reproducible: Always
Steps to Reproduce:
1.run attachment in the js shell
2.
3.
Actual Results:
you get the error message "out of memory" when you're not out of memory.
Attachment #121501 -
Attachment mime type: application/x-javascript → text/plain
Comment on attachment 121501 [details]
js shell test case that causes an inappropriate out of memory error
sorry, wrong file
Attachment #121501 -
Attachment is obsolete: true
cc'ing brendan since he seemed to express some interest in my other experiments
Comment 5•22 years ago
|
||
This testcase thrashes my WinNT box around quite a bit. I actually got
the Windows warning "Your system is running low on memory", after about
three minutes, before getting any JS "out of memory" error.
Comment 6•22 years ago
|
||
This isn't a valid bug. First, when JS says "out of memory", it has hit a null
failure from malloc. Your OS may limit your process size to less than available
physical memory.
Second, using real numbers (IEEE doubles) as array indices, per ECMA-262,
requires turning those indices into strings, which chews up lots more memory
than is saved by the factor of 10 savings in number of elements.
We're not going to optimize things here, so this could be WONTFIX or even
WORKSFORME, but I think the bug is invalid as stated in comment 0.
/be
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Comment 7•22 years ago
|
||
Marking Verified.
ash@huntwork.net: thank you for this report and your testcases;
this is an interesting question -
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•