# How it worked until recently
Servo uses a crate called string-cache for string interning. It defines
an `Atom` type that represents a string (it dereferences to `&str`), but
it take 8 bytes of stack space (whereas `String` take three times that
on 64-bit systems) and is fast to compare for e
This is awesome, and fixes a long-running pain point. Thanks Simon!
On Thu, Nov 3, 2016 at 12:17 PM, Simon Sapin wrote:
> # How it worked until recently
>
> Servo uses a crate called string-cache for string interning. It defines an
> `Atom` type that represents a string (it dereferences to `&str
On 11/3/16 3:17 PM, Simon Sapin wrote:
An important aspect is that atoms with different static sets are
different Rust types.
Just to check that I understand correctly...
Are element names atoms? Which static set do they come from?
Presumably the html5ever one?
When parsing CSS selectors,
Hi Josh,
Do we need to write test cases for what we have done so far? If yes, do we need
to run auto test cases (e.g. unit test) or a simple HTML test page is enough?
Since right now we only did initial steps, we have no idea how to test it. Can
you give us some instructions?
_
On 03/11/16 21:02, Boris Zbarsky wrote:
On 11/3/16 3:17 PM, Simon Sapin wrote:
An important aspect is that atoms with different static sets are
different Rust types.
Just to check that I understand correctly...
Are element names atoms? Which static set do they come from?
Presumably the html5
On Thu, Nov 3, 2016 at 1:30 PM, Simon Sapin wrote:
> On 03/11/16 21:02, Boris Zbarsky wrote:
>
>> On 11/3/16 3:17 PM, Simon Sapin wrote:
>>
>>> An important aspect is that atoms with different static sets are
>>> different Rust types.
>>>
>>
>> Just to check that I understand correctly...
>>
>> A
On 2016-11-03 4:05 PM, ysu...@ncsu.edu wrote:
Hi Josh,
Do we need to write test cases for what we have done so far? If yes, do we need
to run auto test cases (e.g. unit test) or a simple HTML test page is enough?
Since right now we only did initial steps, we have no idea how to test it. Can
y
On 11/3/16 4:30 PM, Simon Sapin wrote:
Servo defines:
type AttrValue = std::string::String;
type Identifier = servo_atoms::Atom;
type ClassName = servo_atoms::Atom;
type LocalName = html5ever_atoms::LocalName;
type NamespacePrefix = html5ever_atoms::Prefix;
Ah, perfect. Th
8 matches
Mail list logo