elm parser

Benchmark created on


Preparation HTML

<script src="https://unpkg.com/elm-debug-transformer@1.1.1/dist/elm-console-debug.js"></script>
<script>

  window.debugParse2 = ElmConsoleDebug.parse;
</script>

<script type="module">
import {parse} from "https://unpkg.com/elm-debug-transformer@1.2.1/dist/index.mjs";
  window.debugParse = parse;
</script>

Setup


Test runner

Ready to run.

Testing in
TestOps/sec
parse v 1.2.1
window.debugParse('Debug model: { random = "<VALUE>", array = Array.fromList [1,2,3,4,5678,3464637,893145,-29], binaryTree = Node (Node (Leaf None) (Leaf None)) (Node (Leaf None) (Leaf None)), bools = (True,False), complexTuple = (1,("longer string",("much longer string",1))), custom = Complex [(1,Some "text" 1),(2,Recursive (Complex [])),(3,None),(4,With_Underscore1)], customRecord = WithRecord [{ age = 21, name = "Joe" }], dict = Dict.fromList [(1,"a"),(2,"b"),(234,"String longer than one char")], dictWithTuples = Dict.fromList [((0,"b",1),"a"),((0,"c",1),"b"),((4,"d",1),"String longer than one char")], float = 123.56, function = <function>, int = 123, list = [Nothing,Just ["String"],Nothing,Nothing], listOfLists = [[["a","b"],["c","d"]],[["e","f"],["g","h"]]], listSingleton = ["Singleton"], nonEmptyList = (1,[]), set = Set.fromList ["Some really long string with some nonsense","a","b"], string = "Some string", triplet = (1,"b",1), tuple = (1,2), unit = () }')
ready
parse v 1.1.1
window.debugParse2('Debug model: { random = "<VALUE>", array = Array.fromList [1,2,3,4,5678,3464637,893145,-29], binaryTree = Node (Node (Leaf None) (Leaf None)) (Node (Leaf None) (Leaf None)), bools = (True,False), complexTuple = (1,("longer string",("much longer string",1))), custom = Complex [(1,Some "text" 1),(2,Recursive (Complex [])),(3,None),(4,With_Underscore1)], customRecord = WithRecord [{ age = 21, name = "Joe" }], dict = Dict.fromList [(1,"a"),(2,"b"),(234,"String longer than one char")], dictWithTuples = Dict.fromList [((0,"b",1),"a"),((0,"c",1),"b"),((4,"d",1),"String longer than one char")], float = 123.56, function = <function>, int = 123, list = [Nothing,Just ["String"],Nothing,Nothing], listOfLists = [[["a","b"],["c","d"]],[["e","f"],["g","h"]]], listSingleton = ["Singleton"], nonEmptyList = (1,[]), set = Set.fromList ["Some really long string with some nonsense","a","b"], string = "Some string", triplet = (1,"b",1), tuple = (1,2), unit = () }')
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.