On Tue, Apr 6, 2010 at 7:59 PM,  <[email protected]> wrote:
> On 2010/04/06 10:38:54, antonm wrote:
>>
>> I believe it was me who removed this flattening, see
>> http://code.google.com/p/v8/source/detail?r=2999
>
>> The idea was that flattening is worth if you write the same string several
>> times.  Otherwise, if you write it out only once, it's cheaper to bypass
>> flattening.
>
>> And overall, it seems right not to bundle two things---writing out and
>> flattening---into one function.
>
>> So could I suggest you to try one of the following approaches:
>
>> 1) in your code, flat string before writing it out;
>> 2) if for some reason that won't work, couldn't we add a flag if string
>> should
>> be made flat (this flag should probably default to false).
>
>> What do you think?
>
> It would be nice to have V8 detect that a string is being written out
> multiple
> times and flatten it automatically.

That might be more trickier than it seems, but if you've got an idea
in patch-form it'd be most appreciated :)

> I'm also fine with flattening the string
> manually but there doesn't seem to be an API call for it?

Would you like to turn your patch into optionally flattening one?

> Is there a reason why WriteAscii flattens?

No special reason---it is not used in WebKit bindings and I forgot to change it.

yours,
anton.

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

To unsubscribe, reply using "remove me" as the subject.

Reply via email to