Closed Bug 739510 Opened 12 years ago Closed 12 years ago

Speed up construction of char * properties

Categories

(Core :: Gecko Profiler, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: jrmuizel, Assigned: jrmuizel)

Details

Attachments

(1 file)

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: 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+
https://hg.mozilla.org/mozilla-central/rev/5130ac1fa079
Status: NEW → RESOLVED
Closed: 12 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.

Attachment

General

Created:
Updated:
Size: