Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

100
Views
Parallel for loops in p5js

I was wondering if it is possible to run parallel for loops in JavaScript using the p5js library?

I am trying to speed up the following code and run multiple points in parallel given each is independent.

for (ix = 0; ix < QSS; ix++) {
    for (iy = 0; iy < QSS; iy++) {

        st1 = 8 * Perlin((ix + xspeed * Tme) / 400 * xs * P2, (iy + yspeed * Tme) / 400 * xs * P2, Tme);
        dst1 = Perlin((ix + xspeed * Tme) / 40 * xs * P2, (iy + yspeed * Tme) / 40 * xs * P2, Tme);
        nss1 = Perlin((ix + xspeed * Tme) / 100 * xs * P2, (iy + yspeed * Tme) / 100 * xs * P2, st1 + dst1, Tme);
        st2 = 8 * Perlin((ix + xspeed * Tme) / 800 * xs * P2, (iy + yspeed * Tme) / 800 * xs * P2, Tme);

    }
}

Perlin is a modified version of the p5js noise function. This seems embarrassingly parallel to me and would be easily possible in a different language, I am just wondering if there is any possible way in JavaScript. Many thanks in advance.

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!