If you need to transfer in bulk, pass []int instead of int. For
example, io.Pipe (and io.Reader and io.Writer) work with []byte, not
byte.
> I am planning to look into Go channels. It's impossible to achieve ultimate
> scalability because of current user interface, though.
>
Seems to me you're just recreating earlier discoveries in parallel
codes. The problem of fine grain vs. comm overheads is always there,
esp. as you scale up. Have you looked at languages specifically
designed for parallelism? There are many of them.
I keep wondering why everyone wants Go to be everything. Generics,
HPC, GPU, FPGA ... I saw this same feeding frenzy when Java came out
-- everyone wanted extensions to make java work well in their
particular part of the world. So we continuously saw requests for Java
to implement the union of all feature sets, without a corresponding
realization that it might not be Java once that was done.
Maybe Go is just not right for your app and you need to use something
else? I realize the channel model is very attractive for what you are
doing, but Go is not the only language which supports that sort of
comms.
ron
On Wed, Jun 22, 2011 at 11:11 AM, Dmitriy Vyukov <dvy...@google.com> wrote:Seems to me you're just recreating earlier discoveries in parallel
> I am planning to look into Go channels. It's impossible to achieve ultimate
> scalability because of current user interface, though.
>
codes. The problem of fine grain vs. comm overheads is always there,
esp. as you scale up.
Have you looked at languages specifically
designed for parallelism? There are many of them.
I keep wondering why everyone wants Go to be everything. Generics,
HPC, GPU, FPGA ...
It's funny that this is directed at Ron, of all people.
Anthony
> What languages do you mean?
I think that ZPL was under-appreciated. You can also look at Cray's
Chapel, it is interesting. But there's a ton of parallel languages out
there, and these two will give you a starting point to find more.
> Btw, it's equally applicable to network servers. One either has problems
> with IO/request dispatching, or requests that big that... well, they deserve
> intra-request parallelization.
That's how we're using it here. I'm more surprised at the continuing
request to make Go do everything, which seems counter to the idea of a
nice tight language that does some things well.
I should not be surprised: it happens with every new language ;-)
ron
that said, it's still useless to pretend that
a send will ever be as cheap as an add.
I am not sure I understand this sentence. Are you saying that "Sending
a single integer over a channel is always slower than adding two
integers"?
Michael T. Jones
Chief Technology Advocate, Google Inc.
1600 Amphitheatre Parkway, Mountain View, California 94043
Email: m...@google.com Mobile: 650-335-5765 Fax: 650-649-1938
Organizing the world's information to make it universally accessible and useful