SlideShare a Scribd company logo
1 of 24
Download to read offline
The World Works in Parallel
Hamidreza Soleimani
Jun 2023
Like when you are breathing, listening to me and
watching this slide all at the same time in parallel
Everything in the word
works in a parallel way
A normal day in Tokyo’s Shibuya street. During its busiest times, an estimated 1,000 to 2,500
people forge cross this intersection every 2 minutes, enough to quickly fill up a football stadium.
The Universe works in a parallel too
… even Hardwares
Moore's law is the
observation that the
number of transistors in
an integrated circuit (IC)
doubles about every two
years.
A semi-log plot of transistor counts for microprocessors against dates of introduction,
nearly doubling every two years
—McMenamin, Adrian (April 15, 2013). "The end of Dennard scaling". Retrieved January 23, 2014.
the exponential processor transistor
growth predicted by Moore does not always
translate into exponentially greater practical
CPU performance.
But
New hardware is
increasingly parallel, so
new technologies must
support concurrency or
they will die!
AMD And Intel Core Count Growth 2010 2022 Only Years With New CPUs
As
you
might
die,
if
can’t
work
in
parallel!
“The way the processor industry is going is to add more
and more cores, but nobody knows how to program those
things. I mean, two, yeah; four, not really; eight, forget it”
—https://archive.nytimes.com/bits.blogs.nytimes.com/2008/06/10/apple-in-parallel-turning-the-pc-world-upside-down/
Steve was Right!
Because of Synchronization challenges like Race Condition!
If multiple threads access a single resource at a time then there is a possibility of data racing or bad output.
Steve was Right!
Because of Synchronization challenges like Race Condition!
Deadlock
which occurs when many
processes are waiting for a
shared resource in critical
section which is being held by
some other process.
Priority Inversion
which occurs when a
high-priority process is in the
critical section, and it is
interrupted by a
medium-priority process. This
violation may lead to serious
consequences in real-time
systems.
Busy Waiting
which occurs when a process
frequently polls to determine if
it has access to a critical
section. This frequent polling
robs processing time from
other processes.
Starvation
which occurs when a process
is waiting to enter the critical
section, but other processes
monopolize the critical
section, and the first process
is forced to wait indefinitely.
Of course there are solutions
Semaphores Spinlock Readers–writer lock Barrier
It is a variable or abstract
data type used to control
access to a common
resource by multiple threads
and avoid critical section
problems in a concurrent
system.
It is a lock that causes a
thread trying to acquire it to
simply wait in a loop ("spin")
while repeatedly checking
whether the lock is
available.
It is a synchronization
primitive which allows
concurrent access for
read-only operations,
whereas write operations
require exclusive access.
It is for a group of threads
or processes in the source
code means any
thread/process must stop
at this point and cannot
proceed until all other
threads/processes reach
this barrier.
Might look “easy-peasy”!
Synchronized
block in Java
Programming
Language
But it results in not using
your multi-core resources!
It can also happen
in
real world!
Steve still seems to be right!
… until we do a quick search:
A question from 12
years ago, close to
when Steve died in
2011.
Concurrency?
Parallelism is about multiple tasks or subtasks of the same task
that literally run at the same time on a hardware with multiple
computing resources like multi-core processor.
Concurrency is about multiple tasks which start, run, and
complete in overlapping time periods, in no specific order.
Parallel ~ Concurrent
Highest score answer
The answer to the
question which was
asked 12 years ago!
a progressive approach!
Actor Model Languages
Ericsson 37 year ago in 1986 Google 13 years ago in 2009 Mozilla 8 years ago in 2015
EPFL 19 years ago in 2004
The time that Steve died 12 years ago in 2011
Steve was not right!
Because
he just didn’t know
Actor Model
%% Spawn 1024 heavy number crunching processes
concurrently
> [spawn(
fun() ->
calc:prime_numbers(10000000) end
)
|| _ <- lists:seq(1, 1024)
].
%% Erlang is still responsive, great!
> calc:prime_numbers(10). %% => [2, 3, 5, 7]
Thanks!
@hmdrezs

More Related Content

What's hot

Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
Dvir Volk
 

What's hot (20)

Deadlock Presentation
Deadlock PresentationDeadlock Presentation
Deadlock Presentation
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
 
Presentation implementing oracle asm successfully
Presentation    implementing oracle asm successfullyPresentation    implementing oracle asm successfully
Presentation implementing oracle asm successfully
 
redis basics
redis basicsredis basics
redis basics
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Getting started with Amazon ElastiCache
Getting started with Amazon ElastiCacheGetting started with Amazon ElastiCache
Getting started with Amazon ElastiCache
 
MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08
 
RESTful Services for your Oracle Autonomous Database
RESTful Services for your Oracle Autonomous DatabaseRESTful Services for your Oracle Autonomous Database
RESTful Services for your Oracle Autonomous Database
 
Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007
 
HA, Scalability, DR & MAA in Oracle Database 21c - Overview
HA, Scalability, DR & MAA in Oracle Database 21c - OverviewHA, Scalability, DR & MAA in Oracle Database 21c - Overview
HA, Scalability, DR & MAA in Oracle Database 21c - Overview
 
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More!
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More! Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More!
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More!
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
MySQL Cookbook: Recipes for Your Business
MySQL Cookbook: Recipes for Your BusinessMySQL Cookbook: Recipes for Your Business
MySQL Cookbook: Recipes for Your Business
 
5 process synchronization
5 process synchronization5 process synchronization
5 process synchronization
 
OpenStack上の環境構築自動化に向けたTerraform/Pulumiの活用
OpenStack上の環境構築自動化に向けたTerraform/Pulumiの活用OpenStack上の環境構築自動化に向けたTerraform/Pulumiの活用
OpenStack上の環境構築自動化に向けたTerraform/Pulumiの活用
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Cassandra at Instagram (August 2013)
Cassandra at Instagram (August 2013)Cassandra at Instagram (August 2013)
Cassandra at Instagram (August 2013)
 
Oracle Active Data Guard: Best Practices and New Features Deep Dive
Oracle Active Data Guard: Best Practices and New Features Deep Dive Oracle Active Data Guard: Best Practices and New Features Deep Dive
Oracle Active Data Guard: Best Practices and New Features Deep Dive
 
How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0
 

Similar to The World works in Parallel | Hamidreza Soleimani | Diginext Academy

Continuous Automated Testing - Cast conference workshop august 2014
Continuous Automated Testing - Cast conference workshop august 2014Continuous Automated Testing - Cast conference workshop august 2014
Continuous Automated Testing - Cast conference workshop august 2014
Noah Sussman
 
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben EvansJava Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
JAX London
 
Lecture 3 and 4 threads
Lecture 3 and 4  threadsLecture 3 and 4  threads
Lecture 3 and 4 threads
Rushdi Shams
 
refORM: Death to ORMs in .NET
refORM: Death to ORMs in .NETrefORM: Death to ORMs in .NET
refORM: Death to ORMs in .NET
James Hughes
 

Similar to The World works in Parallel | Hamidreza Soleimani | Diginext Academy (20)

Adding Simplicity to Complexity
Adding Simplicity to ComplexityAdding Simplicity to Complexity
Adding Simplicity to Complexity
 
Need for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applicationsNeed for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applications
 
Technology Disruption
Technology DisruptionTechnology Disruption
Technology Disruption
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
 
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded SoftwareBeyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
 
From 🤦 to 🐿️
From 🤦 to 🐿️From 🤦 to 🐿️
From 🤦 to 🐿️
 
Mario Fusco - Comparing different concurrency models on the JVM | Codemotion ...
Mario Fusco - Comparing different concurrency models on the JVM | Codemotion ...Mario Fusco - Comparing different concurrency models on the JVM | Codemotion ...
Mario Fusco - Comparing different concurrency models on the JVM | Codemotion ...
 
Hushcon 2016 Keynote: Test for Echo
Hushcon 2016 Keynote: Test for EchoHushcon 2016 Keynote: Test for Echo
Hushcon 2016 Keynote: Test for Echo
 
Java Threading
Java ThreadingJava Threading
Java Threading
 
Continuous Automated Testing - Cast conference workshop august 2014
Continuous Automated Testing - Cast conference workshop august 2014Continuous Automated Testing - Cast conference workshop august 2014
Continuous Automated Testing - Cast conference workshop august 2014
 
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben EvansJava Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
 
Lecture 3 and 4 threads
Lecture 3 and 4  threadsLecture 3 and 4  threads
Lecture 3 and 4 threads
 
State Processes and Cloud - Edition 2014
State Processes and Cloud - Edition 2014State Processes and Cloud - Edition 2014
State Processes and Cloud - Edition 2014
 
Asynchronous Python A Gentle Introduction
Asynchronous Python A Gentle IntroductionAsynchronous Python A Gentle Introduction
Asynchronous Python A Gentle Introduction
 
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded SoftwareBeyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
 
Software engineering the genesis
Software engineering  the genesisSoftware engineering  the genesis
Software engineering the genesis
 
Comparing different concurrency models on the JVM
Comparing different concurrency models on the JVMComparing different concurrency models on the JVM
Comparing different concurrency models on the JVM
 
refORM: Death to ORMs in .NET
refORM: Death to ORMs in .NETrefORM: Death to ORMs in .NET
refORM: Death to ORMs in .NET
 
Chaos Engineering Without Observability ... Is Just Chaos
Chaos Engineering Without Observability ... Is Just ChaosChaos Engineering Without Observability ... Is Just Chaos
Chaos Engineering Without Observability ... Is Just Chaos
 
Luigi lauro thread with care (concurrency pitfalls in java)
Luigi lauro   thread with care (concurrency pitfalls in java)Luigi lauro   thread with care (concurrency pitfalls in java)
Luigi lauro thread with care (concurrency pitfalls in java)
 

More from Hamidreza Soleimani

More from Hamidreza Soleimani (11)

Architecting Scalable Platforms in Erlang/OTP | Hamidreza Soleimani | Diginex...
Architecting Scalable Platforms in Erlang/OTP | Hamidreza Soleimani | Diginex...Architecting Scalable Platforms in Erlang/OTP | Hamidreza Soleimani | Diginex...
Architecting Scalable Platforms in Erlang/OTP | Hamidreza Soleimani | Diginex...
 
How to Scale Your Engineering Team | Hamidreza Soleimani | Diginext Academy
How to Scale Your Engineering Team | Hamidreza Soleimani | Diginext AcademyHow to Scale Your Engineering Team | Hamidreza Soleimani | Diginext Academy
How to Scale Your Engineering Team | Hamidreza Soleimani | Diginext Academy
 
Technology Companies Development Story
Technology Companies Development StoryTechnology Companies Development Story
Technology Companies Development Story
 
Do Reinvent the Wheel - Nov 2021 - DigiNext.pdf
Do Reinvent the Wheel - Nov 2021 - DigiNext.pdfDo Reinvent the Wheel - Nov 2021 - DigiNext.pdf
Do Reinvent the Wheel - Nov 2021 - DigiNext.pdf
 
BEAM (Erlang VM) as a Soft Real-time Platform
BEAM (Erlang VM) as a Soft Real-time PlatformBEAM (Erlang VM) as a Soft Real-time Platform
BEAM (Erlang VM) as a Soft Real-time Platform
 
Nanomsg - Scalable Networking Library
Nanomsg - Scalable Networking LibraryNanomsg - Scalable Networking Library
Nanomsg - Scalable Networking Library
 
Event Driven Architecture Concepts in Web Technologies - Part 2
Event Driven Architecture Concepts in Web Technologies - Part 2Event Driven Architecture Concepts in Web Technologies - Part 2
Event Driven Architecture Concepts in Web Technologies - Part 2
 
Event Driven Architecture Concepts in Web Technologies - Part 1
Event Driven Architecture Concepts in Web Technologies - Part 1Event Driven Architecture Concepts in Web Technologies - Part 1
Event Driven Architecture Concepts in Web Technologies - Part 1
 
Nodejs Applications in Production
Nodejs Applications in ProductionNodejs Applications in Production
Nodejs Applications in Production
 
Practical Look at Erlang
Practical Look at ErlangPractical Look at Erlang
Practical Look at Erlang
 
What is XMPP Protocol
What is XMPP ProtocolWhat is XMPP Protocol
What is XMPP Protocol
 

Recently uploaded

Microsoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdfMicrosoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdf
Overkill Security
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 

Recently uploaded (20)

Microsoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdfMicrosoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdf
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
Navigating the Large Language Model choices_Ravi Daparthi
Navigating the Large Language Model choices_Ravi DaparthiNavigating the Large Language Model choices_Ravi Daparthi
Navigating the Large Language Model choices_Ravi Daparthi
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
How to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in PakistanHow to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in Pakistan
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 

The World works in Parallel | Hamidreza Soleimani | Diginext Academy

  • 1. The World Works in Parallel Hamidreza Soleimani Jun 2023
  • 2. Like when you are breathing, listening to me and watching this slide all at the same time in parallel Everything in the word works in a parallel way
  • 3. A normal day in Tokyo’s Shibuya street. During its busiest times, an estimated 1,000 to 2,500 people forge cross this intersection every 2 minutes, enough to quickly fill up a football stadium.
  • 4. The Universe works in a parallel too … even Hardwares
  • 5. Moore's law is the observation that the number of transistors in an integrated circuit (IC) doubles about every two years. A semi-log plot of transistor counts for microprocessors against dates of introduction, nearly doubling every two years
  • 6. —McMenamin, Adrian (April 15, 2013). "The end of Dennard scaling". Retrieved January 23, 2014. the exponential processor transistor growth predicted by Moore does not always translate into exponentially greater practical CPU performance. But
  • 7. New hardware is increasingly parallel, so new technologies must support concurrency or they will die! AMD And Intel Core Count Growth 2010 2022 Only Years With New CPUs
  • 9. “The way the processor industry is going is to add more and more cores, but nobody knows how to program those things. I mean, two, yeah; four, not really; eight, forget it” —https://archive.nytimes.com/bits.blogs.nytimes.com/2008/06/10/apple-in-parallel-turning-the-pc-world-upside-down/
  • 10. Steve was Right! Because of Synchronization challenges like Race Condition! If multiple threads access a single resource at a time then there is a possibility of data racing or bad output.
  • 11. Steve was Right! Because of Synchronization challenges like Race Condition! Deadlock which occurs when many processes are waiting for a shared resource in critical section which is being held by some other process. Priority Inversion which occurs when a high-priority process is in the critical section, and it is interrupted by a medium-priority process. This violation may lead to serious consequences in real-time systems. Busy Waiting which occurs when a process frequently polls to determine if it has access to a critical section. This frequent polling robs processing time from other processes. Starvation which occurs when a process is waiting to enter the critical section, but other processes monopolize the critical section, and the first process is forced to wait indefinitely.
  • 12. Of course there are solutions Semaphores Spinlock Readers–writer lock Barrier It is a variable or abstract data type used to control access to a common resource by multiple threads and avoid critical section problems in a concurrent system. It is a lock that causes a thread trying to acquire it to simply wait in a loop ("spin") while repeatedly checking whether the lock is available. It is a synchronization primitive which allows concurrent access for read-only operations, whereas write operations require exclusive access. It is for a group of threads or processes in the source code means any thread/process must stop at this point and cannot proceed until all other threads/processes reach this barrier.
  • 13. Might look “easy-peasy”! Synchronized block in Java Programming Language
  • 14. But it results in not using your multi-core resources!
  • 15. It can also happen in real world!
  • 16. Steve still seems to be right!
  • 17. … until we do a quick search: A question from 12 years ago, close to when Steve died in 2011.
  • 18. Concurrency? Parallelism is about multiple tasks or subtasks of the same task that literally run at the same time on a hardware with multiple computing resources like multi-core processor. Concurrency is about multiple tasks which start, run, and complete in overlapping time periods, in no specific order.
  • 20. Highest score answer The answer to the question which was asked 12 years ago! a progressive approach!
  • 21. Actor Model Languages Ericsson 37 year ago in 1986 Google 13 years ago in 2009 Mozilla 8 years ago in 2015 EPFL 19 years ago in 2004 The time that Steve died 12 years ago in 2011
  • 22. Steve was not right!
  • 23. Because he just didn’t know Actor Model %% Spawn 1024 heavy number crunching processes concurrently > [spawn( fun() -> calc:prime_numbers(10000000) end ) || _ <- lists:seq(1, 1024) ]. %% Erlang is still responsive, great! > calc:prime_numbers(10). %% => [2, 3, 5, 7]