TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

GoPar: Automatic Loop Parallelization of Go Programs

14 pointsby wetherbeeiabout 12 years ago

2 comments

JulianMorrisonabout 12 years ago
It's cute, but the work to manually parallelize is pretty light in Go.<p><pre><code> var a []X ... done := make(chan bool) b := make([]Y,len(a)) for i, _ := range a { go func (j int){ b[j] = process(a[j]) done &#60;- true }(i) } for n:=0; n&#60;len(a); n++ { _ = &#60;-done }</code></pre>
评论 #5660757 未加载
codygmanabout 12 years ago
Well this definitely looks interesting, going to check it out asap and test on my projects.