Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrency or not concurrency? #57

Open
NobbZ opened this issue Mar 27, 2016 · 3 comments
Open

Concurrency or not concurrency? #57

NobbZ opened this issue Mar 27, 2016 · 3 comments

Comments

@NobbZ
Copy link
Contributor

NobbZ commented Mar 27, 2016

There is that rule in the README:

  • single-thread is preferred but you can add multi-threaded or multicore versions too

This reads as if there shall be a singlethreaded contribution for a language, and then multithreaded contributions can be added as seperate entries.

Now there was this cleanup which threw out quite a lot of programs in languages that had multiple entries.

Since Elixir is a language that bets on concurrency, I'd like to retry a concurrent version before starting this in Erlang.

So how do we handle this?

It would be very easy to add a CLI-switch/subcommand to the script which does enable/disable concurrency easily, but then still the question remains, how to handle it during the runs?

@juditacs
Copy link
Owner

I see two possibilities for each language:

  1. concurrency can be enabled with a cli-switch/subcommand/whatever, the code is the same
  2. the concurrent code is different from the single-threaded,

If we choose the Makefile structure you suggested, there could be a run and a run-parallel command (if it is implemented). What do you think?

@NobbZ
Copy link
Contributor Author

NobbZ commented Mar 28, 2016

Sounds reasonable.

@michaelortmann
Copy link

the java implementation uses threading:

$ cat data/huwiki-latest-pages-meta-current.xml | /usr/bin/time -v java -Xms2G -Xmx8G -classpath java:java/zah-0.6.jar WordCountOptimized >out-java.txt
[...]
	Percent of CPU this job got: 141%
[...]
$ java --version
openjdk 21.0.2 2024-01-16
OpenJDK Runtime Environment (build 21.0.2+13)
OpenJDK 64-Bit Server VM (build 21.0.2+13, mixed mode, sharing)
[...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants