Hey Scott,
We have a small php test script on a private Dropbox account that we
have been using for testing, which will be moved to GitHub some time
soon.
The API is pretty straightforward, an example (This is basically our
test script):
<?php
function test_callback($indices) {
foreach ($indices as $idx) {
echo "{$idx}\n";
flush();
}
}
// Parameters are, (start index, length, function, optional grain
size)
parallel_for(0, 1000, 'test_callback');
// Will print from 0 to 1000 using multiple cores
?>
We have no benchmarks at this stage, although we plan on integrating
this with a custom Wordpress fork which we will most definitely
benchmark in the future.
Cool, call_user_func_async() and the associated memory copying/merging
is something I will be looking at a bit more closely soon.
Cheers,
Zane
On Jul 27, 2:55 pm, Scott MacVicar <
macvi...@facebook.com> wrote:
> Hey Zane,
>
> Thanks for the first contribution, do you have a test script and some benchmarks that you've used this with?
>
> We've looked at adding a call_user_func_async() that would do a limited threading within HipHop.
>
> - Scott
>
> On Jul 26, 2010, at 4:56 PM, ZaneA wrote:
>
>
>
> > Hello HipHop users and developers!
>
> > I am sending this message on behalf of OpenParallel, a group that is
> > working to further multi-core processing into the mainstream. I am
> > here today to announce our HipHop branch/extension that aims to push
> > the integration of Intel’s Threading Building Blocks library into
> > HipHop beyond the already utilized data structures (such as the
> > concurrent_hash_map).
> > In particular we are looking to get some parallel functionality
> > exposed to PHP itself through this extension.
>
> > We have already had some initial success with a parallel_for
> > implementation that can be used from PHP scripts using a familiar API
> > (Aligned with the C++ API but slightly modified to better suit PHP
> > style).
>
> > Our repository can be found athttp://
github.com/OpenParallel/hiphop-php,