[rust-dev] Performance optimization

Graydon Hoare graydon at mozilla.com
Fri Apr 6 22:22:08 PDT 2012


On 06/04/2012 9:52 PM, Sebastian Sylvan wrote:

> I assume you mean on *nix? Maybe I'm doing something wrong, but on
> windows I don't get any stack symbols.

Huh. That's surprising. I'd have thought at least the PE/COFF symbols 
would show up. Guess it depends on the tool. We're not producing .pdb 
files or anything, if that's what you mean.

> Either, really. The main hindrance is the inability to share data
> between "tasks" (or data parallel "kernels"), is there a story for
> that now?
> In this particular example I have a multi-megabyte kd-tree structure
> for the model that I really need to share between all the parallel
> tasks.

At the moment we have no mechanism for "sharing" data, just moving it. 
So scatter/gather operations have to be done by "breaking" data 
structures (say, swapping 'some(node)' with 'none' at various points in 
a tree, in a structure made up of option<node>) , and moving the 
broken-off subtrees to sub-tasks for processing. This is not entirely 
convenient and not always a useful model.

We've discussed in the past -- are likely to investigate further, 
especially now that regions are starting to work -- creating a library 
mechanism of some sort (perhaps a region associated with the lifetime of 
a group of tasks) with multi-reader / single-writer semantics, or 
publish/subscribe semantics, or similar. In programs like that, channels 
would be used for signalling but not for carrying the bulkier underlying 
data. But we haven't built anything like that yet, no.

-Graydon


More information about the Rust-dev mailing list