On 1/4/13 5:27 PM, Brian Anderson wrote:
This sounds like you are asking for DOM types that use inheritance.
I'm not going that far. I'm saying we need a fast way of going from
whatever is stored in the JSObject (typically a single void*) to
something we can call methods on. And that the methods should ideally
be non-virtual if we want decent performance and Node methods, e.g.,
should work no matter what sort of Node we actually have. Inheritance
is one obvious way to do this, but if we have another option, that's
great too.
I assume that it's important to also have static dispatch
on the method calls, which seems to me the harder part, but pcwalton
says we will have a solution.
Sounds good.
2) For sequence in params for WebGL, you really want to
stack-allocate the array for short arrays. Passing very short
sequences for uniform*fv is common, and heap-allocation is expensive.
From Rust's perspective this shouldn't be a problem since we can make
vectors on the stack.
Sure, so can we in Gecko (nsAutoTArray). We just need to make sure we
do it.
I've been worrying a bit about string representations and interning.
As you should! It's a pain to change later, and all the solutions we
know of suck. ;)
Our current CSS implementation uses its own string format and interner, with
all the conversions that implies.
Yeah, that's bad. Long-term, we would ideally have only one string
format and interner in the whole system.... though interning when
multiple threads are involved is a PITA.
My understanding is that JSString is not threadsafe either.
Correct. Nothing in JS is threadsafe; interned stuff in JS needs to be
past-thread.
Can JSString be modified to work correctly and fast in a multithreaded
setting?
I think that depends on what you want to do with it. If you have a
known-rooted string that's already flat, then yes, because at that point
it's an immutable object.
But making ropes work fast in a multithreaded setting sounds unpleasant.
-Boris
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo