CodingTrain / CodingTrain/Suggestion-Box

Demonstrating parallel computing on a dual core chomebook with javascript

Aperta
#1,219 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
570
Fork
85
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

It would be really cool to have a simple p5.js-based activity that demonstrates how to accelerate a computation with parallelism even if the only parallelism you have is a dual core chromebook.

There are a couple different javascript libraries that people use to do parallel computing. These are parallel.js, threads.js, hamsters.js and parallel.es

These libraries are compared in this pdf
https://raw.githubusercontent.com/MichaReiser/parallel-es-report/master/parallel-es.pdf

I have built a lot of content in p5.js but it is hard for me to tell which of these libraries would play the nicest with p5.js or if there are things about p5.js that would prevent something like this.

Sometimes students ask us about doing parallel computations, but we typically can't help them because it requires a linux account, linux familiarity and MPI or OpenMP. It would make life much easier for a lot of educators to have a demo that works even on dual core chromebooks.

For example here is a demo that should work:
https://www.hamsters.io/examples/squareroot

It would be nice to see something like this in p5.js. The code for the example above is not particularly readable by novice coders. It's the kind of thing p5.js was invented to simplify.

I am told that this may be harder than it sounds because when you only have two cores, sometimes it is difficult to get a good speedup even if it is an embarassingly parallel operation. One of the cores has to be both captain and do computations, so the speedup from 1 to 2 is not always that great. Getting something simple like this to work even on a chromebook would be a feat worthy of the coding train.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia confrontando le librerie di calcolo parallelo collegate e l'esempio square-root di hamsters.io, quindi valuta come un'attività p5.js potrebbe essere eseguita su un Chromebook dual-core. Il lavoro sarà considerato completato quando sarà disponibile una dimostrazione p5.js leggibile e semplice che mostri l'accelerazione parallela a chi è alle prime armi con la programmazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
content, web-dev
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.