Stability: 1 - Experimental
var Tart = ;var config = ;// create an actor that has no state and can't change behaviorvar actor = config;// create a value actor that has state, but can't change behaviorvar value = config;// create a serial actor that has state and can change behaviorvar serial = config;config;config;config;
Erlang Challenge consists of creating a ring of M actors, sending N simple messages around the ring and increasing M until running out of resources.
The benchmark implements a modified version of the challenge by creating 100,000 actors and running 10 simple messages around the ring.
npm run erlangChallenge constructed 100000 actor ring .......... done all times in NANOSECONDS construction time: 2900829022 loop times: 627685921 631848011 666029990 731236694 775333540 615891053 612743213 684856367 721228999 769791008 611477526 loop average: 677102029.2727273
The goal of
Actors consist only of behaviors and maintain no internal state. To create a new actor:
var Tart = ;var config = ;var actor = config;
Value actors consist of behaviors and state, but cannot change the behavior. To create a new value actor:
var Tart = ;var config = ;var value = config;
Serial actors have state and can change their behaviors by using
event.become() function. To create a new serial actor:
var Tart = ;var config = ;var serial = config;