The default bug view has changed. See this FAQ.

Speed up construction of char * properties

RESOLVED FIXED in mozilla14

Status

()

Core
Gecko Profiler
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jrmuizel, Assigned: jrmuizel)

Tracking

unspecified
mozilla14
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
This eliminates two additional copies: NS_ConvertASCIItoUTF16 and PromiseFlatString by constructing the JSString directly. It is also designed
so that literal strings will have their strlen computed at compile time.
(Assignee)

Comment 1

5 years ago
Created attachment 609594 [details] [diff] [review]
Speed up DefineProperty for const char *
Assignee: nobody → jmuizelaar
Attachment #609594 - Flags: review?
Comment on attachment 609594 [details] [diff] [review]
Speed up DefineProperty for const char *

Review of attachment 609594 [details] [diff] [review]:
-----------------------------------------------------------------

::: tools/profiler/JSObjectBuilder.h
@@ +93,5 @@
> +    if (!string)
> +      mOk = JS_FALSE;
> +
> +    if (!mOk)
> +      return;

if (!string) {
  mOk = JS_FALSE;
  return;
}
Attachment #609594 - Flags: review? → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/5130ac1fa079
https://hg.mozilla.org/mozilla-central/rev/5130ac1fa079
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
(In reply to Jeff Muizelaar [:jrmuizel] from comment #0)
> It is also designed
> so that literal strings will have their strlen computed at compile time.

How so?
You need to log in before you can comment on or make changes to this bug.