From f039ad07e02fd9808a952cf351b33292ad0fa931 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Wed, 1 Aug 2018 18:39:36 +0200 Subject: [PATCH 01/25] Remove datasize and update stack --- .travis.yml | 3 +-- stack.newest.yaml | 17 ----------------- stack.yaml | 17 +++++++---------- 3 files changed, 8 insertions(+), 29 deletions(-) delete mode 100644 stack.newest.yaml diff --git a/.travis.yml b/.travis.yml index a4ea33f..26b319f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,6 @@ env: - DO=TIME STEP=1 - DO=TIME STEP=2 - DO=SPACE -- DO=DATASIZE install: # Build dependencies @@ -46,7 +45,7 @@ script: # Build the package, its tests, and its docs and run the tests - stack --no-terminal bench --no-run-benchmarks - PREFIX=.stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build -- if [ $DO = DATASIZE ]; then travis_wait $PREFIX/datasize/datasize; else if [ $DO = SPACE ]; then travis_wait 30 $PREFIX/space/space; else $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; fi; +- if [ $DO = SPACE ]; then travis_wait 30 $PREFIX/space/space; else $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; before_install: diff --git a/stack.newest.yaml b/stack.newest.yaml deleted file mode 100644 index c3216f5..0000000 --- a/stack.newest.yaml +++ /dev/null @@ -1,17 +0,0 @@ -resolver: lts-12.1 - -packages: - - '.' - -# GHC heap view will fail to build -extra-deps: - - git: https://github.com/patrickdoc/hash-graph.git - commit: 785c20dc608774b133d89c942bc33d7f56ef6ced - - git: https://github.com/snowleopard/alga.git - commit: 1e0538a902655095f545011df8af4c06bc336c53 - - Chart-1.9 - - Chart-cairo-1.9 - -flags: - bench-graph: - datasize: false diff --git a/stack.yaml b/stack.yaml index 3ca665a..dcdb675 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,21 +1,18 @@ -resolver: lts-11.15 +resolver: lts-12.4 packages: - '.' +# GHC heap view will fail to build extra-deps: - git: https://github.com/patrickdoc/hash-graph.git commit: 785c20dc608774b133d89c942bc33d7f56ef6ced - git: https://github.com/snowleopard/alga.git - commit: 7c585142afc3811dc44093f5e6e7165f6f609539 - - ghc-datasize-0.2.0 - - ghc-heap-view-0.5.10 - - criterion-1.4.0.0 - - base-compat-batteries-0.10.1 - - Chart-cairo-1.9 + commit: 1e0538a902655095f545011df8af4c06bc336c53 - Chart-1.9 + - Chart-cairo-1.9 +# So we disable it flags: - ghc-heap-view: - ghc_8_0: false - ghc_8_2: true + bench-graph: + datasize: false From 17f0d8f3513a993d6ae40ddfe44053875acca818 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Sun, 5 Aug 2018 18:08:05 +0200 Subject: [PATCH 02/25] Update chart render to scale --- src/BenchGraph/Render/Chart.hs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/BenchGraph/Render/Chart.hs b/src/BenchGraph/Render/Chart.hs index 39832d6..d41483d 100644 --- a/src/BenchGraph/Render/Chart.hs +++ b/src/BenchGraph/Render/Chart.hs @@ -24,6 +24,12 @@ import BenchGraph.Named import BenchGraph.Render.Common import BenchGraph.Utils +fixGap1 :: Double +fixGap1 = 10 + +fixGap2 :: Double +fixGap2 = 20 + mkChart :: String -- ^ The name of the benchs -> [(String,Int)] @@ -68,6 +74,7 @@ mkChart title gparam s (ChartOutput filename chopt) grouped' = layout e = layout_title .~ fst e $ layout_title_style . font_size .~ 10 + $ layout_x_axis . laxis_style . axis_label_style . font_size .~ 8 $ layout_x_axis . laxis_generate .~ autoIndexAxis (M.keys mapVal) $ layout_y_axis . laxis_override .~ (over axis_labels (\x -> [map (\(y,_) -> (y,s $ 10**(y - fromIntegral expo))) $ head x]) . axisGridHide ) -- Change the label with the corresponding 10 power $ layout_left_axis_visibility . axis_show_ticks .~ False @@ -82,13 +89,13 @@ mkChart title gparam s (ChartOutput filename chopt) grouped' = $ plot_bars_values .~ addIndexes (map elems $ elems mapVal) $ plot_bars_singleton_width .~ 100 $ plot_bars_style .~ BarsClustered - $ plot_bars_spacing .~ BarsFixGap 30 5 + $ plot_bars_spacing .~ BarsFixGap fixGap1 fixGap2 $ plot_bars_item_styles .~ map snd (filter (\(n,_) -> n `elem` libsName) colors) $ def where libsName = tkLibsName $ either id (map $ fmap fst) <$> snd e colors = zip (S.toList is) - $ take (S.size is) $ map (\c -> (solidFillStyle c, Just (solidLine 1.0 $ opaque black))) (cycle defaultColorSeq) + $ take (S.size is) $ map (\c -> (solidFillStyle c, Just (solidLine 0.5 $ opaque black))) (cycle defaultColorSeq) (expo,mapVal,std) = mkValue $ snd e @@ -113,7 +120,7 @@ mkChart title gparam s (ChartOutput filename chopt) grouped' = barsErrs v = plot_errbars_values .~ mkErrPts v $ plot_errbars_line_style .~ solidLine 1 (opaque black) - $ plot_errbars_tick_length .~ 7 + $ plot_errbars_tick_length .~ 2 $ def where mkErrPts = map (\(a,b,c) -> ErrPoint (ErrValue 0 0 0) (ErrValue a b c)) . concat -- ErrValue for x will be set after @@ -133,7 +140,7 @@ updateRender i allBarPoints p pmap = mapM_ clusteredErrBars vals offset j = fromIntegral (2*j-nys) * width/2 + width/2 vals = addIndexes $ group i $ _plot_errbars_values p - width = max (minXInterval - 30) 5 / fromIntegral nys + width = max (minXInterval - fixGap1) fixGap2 / fromIntegral nys minXInterval = let diffs = zipWith (-) (tail mxs) mxs in if null diffs then 100 From 6f139959a0b6e7d814227b704984e5e9d0b36ab6 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Sun, 5 Aug 2018 19:11:39 +0200 Subject: [PATCH 03/25] Usuable edgesNotInGraph --- src/BenchGraph/Suites.hs | 13 ++----------- src/BenchGraph/Time.hs | 5 ++--- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/BenchGraph/Suites.hs b/src/BenchGraph/Suites.hs index bcebad4..465740b 100644 --- a/src/BenchGraph/Suites.hs +++ b/src/BenchGraph/Suites.hs @@ -73,7 +73,7 @@ hasEdge fun genArg = Suite { name = "hasEdge" , desc = "Test if the given edge is in the graph (with arguments both in the graph and not in the graph (where applicable))" , algorithm = fun - , inputs = \x -> map (fmap genArg) $ withNames $ getDifferents x ++ edgesNotInGraph' x + , inputs = \x -> map (fmap genArg) $ withNames $ getDifferents x ++ take 3 (edgesNotInGraph x) } addEdge :: NFData o => SpecialisedSuite Edge o i g @@ -81,7 +81,7 @@ addEdge fun genArg = Suite { name = "addEdge" , desc = "Add an edge (not already in the graph)" , algorithm = fun - , inputs = map (fmap genArg) . withNames . edgesNotInGraph' + , inputs = map (fmap genArg) . withNames . take 3 . edgesNotInGraph } removeEdge :: NFData o => SpecialisedSuite Edge o i g @@ -142,12 +142,3 @@ getDifferents :: Edges -> Edges getDifferents edgs = if length edgs >= 2 then nub [edgs!!2, edgs !! (length edgs `div` 2 - 1), last $ init edgs] else edgs - -edgesNotInGraph' :: Edges -> Edges -edgesNotInGraph' x = if lx >= 3 - then let edgs = edgesNotInGraph x - in [edgs !! 2, edgs !! (lx `div` 10), edgs !! ((2*lx) `div` 10)] - else take 3 $ edgesNotInGraph x - where - lx = length x - diff --git a/src/BenchGraph/Time.hs b/src/BenchGraph/Time.hs index 75ac54b..8a1afac 100644 --- a/src/BenchGraph/Time.hs +++ b/src/BenchGraph/Time.hs @@ -29,13 +29,12 @@ benchSuite :: (GraphImpl g, NFData g, NFData o) benchSuite benchCreation algorithm' inputs' gfunc size = bgroup (show sizeName) cases where (edges, sizeName) = gfunc size - !graph = case edges of + graph = case edges of [] -> const mkVertex _ -> mkGraph cases = if benchCreation then [ bench name' $ nf (algorithm' i . graph) $!! edges | (name',i) <- inputs' edges ] - else let !gr = graph edges - in [ bench name' $ nf (algorithm' i) $!! gr | (name',i) <- inputs' edges ] + else [ bench name' $ nf (algorithm' i) $!! graph edges | (name',i) <- inputs' edges ] allBench :: (GraphImpl g, NFData g) => Bool -- ^ Do we bench creation of the graph ? From 7a2d3a428ece1a1dd1e2aee6dd486205cdaa41ca Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Sun, 5 Aug 2018 21:00:22 +0200 Subject: [PATCH 04/25] Update travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 26b319f..b6c4f3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,7 +44,7 @@ install: script: # Build the package, its tests, and its docs and run the tests - stack --no-terminal bench --no-run-benchmarks -- PREFIX=.stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build +- PREFIX=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build - if [ $DO = SPACE ]; then travis_wait 30 $PREFIX/space/space; else $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; From 2613e5d7e4347be7b4df9f872d3b9184287f2979 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Sun, 5 Aug 2018 21:46:19 +0200 Subject: [PATCH 05/25] Sort by name --- bench/Space.hs | 2 +- bench/Time.hs | 6 +++--- src/BenchGraph/Render/Chart.hs | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/bench/Space.hs b/bench/Space.hs index 928200a..c10deab 100644 --- a/bench/Space.hs +++ b/bench/Space.hs @@ -93,7 +93,7 @@ useResults flg notDef todo = do renderG :: T.ChartOutput -> [Maybe (Named (T.Grouped [Named Double]))] -> IO () #ifdef CHART -renderG x results = mkChart "Space results" defaultGr show x $ Left $ catMaybes results +renderG x results = mkChart "Space results" defaultGr show x $ Left $ sortBy (on compare fst) $ catMaybes results #else renderG _ _ = return () #endif diff --git a/bench/Time.hs b/bench/Time.hs index e71893e..0a62734 100644 --- a/bench/Time.hs +++ b/bench/Time.hs @@ -112,7 +112,7 @@ genReport gr flg arr = do renderG :: [(String,Int)] -> ChartOutput -> [Maybe (Name, Grouped [(Name, (Double, Double))])] -> IO () #ifdef CHART -renderG gr x results = mkChart "Time results" gr secs x $ Right $ catMaybes results +renderG gr x results = mkChart "Time results" gr secs x $ Right $ sortBy (on compare fst) $ catMaybes results #else renderG _ _ _ = return () #endif @@ -210,7 +210,7 @@ main' opts Libs -> putStr $ unlines $ nub $ map fst listOfSuites ++ map fst (listOfCreation False []) Render filep dg -> do (gr,res) <- span (/='\n') <$> readFile filep - renderG (read gr) dg (read res) + renderG (read gr) dg $ read res Run opt nottodo' flg libs benchWithCreation dontBenchLittleOnes gr' -> do let modifyL = case libs of Nothing -> id @@ -226,7 +226,7 @@ main' opts per = length grNames `div` two f = if one' + 1 == two then id else take (one*per) in drop ((one-1)*per) $ f grNames - samples = filter (\(_,n) -> let nam = either fst showBenchName n in nam `elem` todo && nam `notElem` nottodo) grList' + samples = sortBy (on compare (either fst showBenchName . snd)) $ filter (\(_,n) -> let nam = either fst showBenchName n in nam `elem` todo && nam `notElem` nottodo) grList' unless (staOut flg == QuickComparison) $ printHeader gr $ nub $ map (either fst showBenchName . snd) samples genReport gr flg samples where diff --git a/src/BenchGraph/Render/Chart.hs b/src/BenchGraph/Render/Chart.hs index d41483d..eb6a88d 100644 --- a/src/BenchGraph/Render/Chart.hs +++ b/src/BenchGraph/Render/Chart.hs @@ -58,7 +58,11 @@ mkChart title gparam s (ChartOutput filename chopt) grouped' = ls = def { _font_size = 20 , _font_weight = FontWeightBold } -- Infor about graphs used - graphsInfo = setPickFn nullPickFn $ label ls' HTA_Centre VTA_Centre $ (++) "Graphs used: " $ intercalate ", " $ map (\((n,f),xs) -> unwords [n,"with",show $ snd $ f $ last xs,"vertices"]) $ graphs True gparam + graphsInfo = setPickFn nullPickFn $ label ls' HTA_Centre VTA_Centre $ (++) "Graphs used: " $ intercalate ", " $ map (\((n,f),xs) -> + case n of + "RealLife" -> unwords [n,"number",show $ snd $ f $ last xs] + _ -> unwords [n,"with",show $ snd $ f $ last xs,"vertices"]) + $ graphs True gparam ls' = def { _font_size = 15 , _font_weight = FontWeightNormal } -- Recreate the legend From b654175fd0283be250fb565eee99b637b9077d55 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Sun, 5 Aug 2018 22:07:01 +0200 Subject: [PATCH 06/25] Start new results --- results/TIME.md | 2419 ++++++++++++++++++++++++++++++----------------- 1 file changed, 1543 insertions(+), 876 deletions(-) diff --git a/results/TIME.md b/results/TIME.md index d875b09..f3be8f9 100644 --- a/results/TIME.md +++ b/results/TIME.md @@ -1,38 +1,33 @@ -The content of this file was obtained with: -```Bash -$ time run -g '("Clique",4)' -g '("Mesh",4)' -g '("RealLife",4)' -d Html -``` - # Benchmarks Doing: ---- -* [edgeList](#edgelist) -* [vertexList](#vertexlist) -* [equality](#equality) -* [transpose](#transpose) +* [addEdge](#addedge) +* [addVertex](#addvertex) +* [creation](#creation) * [dff](#dff) -* [topSort](#topsort) -* [reachable](#reachable) -* [vertexCount](#vertexcount) +* [edgeList](#edgelist) * [edgeCount](#edgecount) +* [equality](#equality) * [hasEdge](#hasedge) -* [isEmpty](#isempty) * [hasVertex](#hasvertex) -* [addEdge](#addedge) -* [addVertex](#addvertex) -* [removeVertex](#removevertex) -* [removeEdge](#removeedge) +* [isEmpty](#isempty) * [mergeContext](#mergecontext) -* [creation](#creation) +* [reachable](#reachable) +* [removeEdge](#removeedge) +* [removeVertex](#removevertex) +* [topSort](#topsort) +* [transpose](#transpose) +* [vertexCount](#vertexcount) +* [vertexList](#vertexlist) ---- Using [("Clique",4),("Mesh",4),("RealLife",4)] as graphs -## edgeList +## addEdge -Description: Produce a list of the edges in the graph +Description: Add an edge (not already in the graph) ### Clique @@ -57,16 +52,16 @@ Description: Produce a list of the edges in the graph Alga @@ -74,16 +69,16 @@ Description: Produce a list of the edges in the graph Containers @@ -91,16 +86,16 @@ Description: Produce a list of the edges in the graph Fgl @@ -108,16 +103,16 @@ Description: Produce a list of the edges in the graph Hash-Graph
- 47.14 ns + 53.40 ns - 38.58 μs + 1.272 μs - 7.614 ms + 128.7 μs - 1.147 s + 15.40 ms
- 37.79 ns + 76.21 ns - 961.2 ns + 535.5 ns - 80.39 μs + 38.57 μs - 25.33 ms + 23.57 ms
- 32.17 ns + 120.6 ns - 2.882 μs + 2.095 μs - 327.3 μs + 190.9 μs - 120.8 ms + 28.44 ms
- 35.29 ns + 170.4 ns - 1.808 μs + 4.088 μs - 304.7 μs + 385.9 μs - 228.5 ms + 43.19 ms
@@ -145,16 +140,16 @@ Description: Produce a list of the edges in the graph Alga - 46.24 ns + 56.80 ns - 10.08 μs + 451.5 ns - 200.6 μs + 4.493 μs - 3.350 ms + 52.12 μs @@ -162,16 +157,16 @@ Description: Produce a list of the edges in the graph Containers - 37.88 ns + 72.67 ns - 446.6 ns + 348.7 ns - 4.564 μs + 2.795 μs - 49.38 μs + 27.69 μs @@ -179,16 +174,16 @@ Description: Produce a list of the edges in the graph Fgl - 32.46 ns + 118.6 ns - 926.8 ns + 981.5 ns - 12.44 μs + 9.440 μs - 136.8 μs + 94.10 μs @@ -196,16 +191,16 @@ Description: Produce a list of the edges in the graph Hash-Graph - 35.27 ns + 172.5 ns - 686.2 ns + 1.789 μs - 9.763 μs + 19.94 μs - 148.5 μs + 234.0 μs @@ -233,16 +228,16 @@ Description: Produce a list of the edges in the graph Alga - 17.50 μs + 680.4 ns - 521.7 μs + 11.36 μs - 6.392 ms + 88.76 μs - 79.88 ms + 704.8 μs @@ -250,16 +245,16 @@ Description: Produce a list of the edges in the graph Containers - 606.5 ns + 452.1 ns - 8.157 μs + 5.053 μs - 58.55 μs + 30.46 μs - 451.4 μs + 218.4 μs @@ -267,16 +262,16 @@ Description: Produce a list of the edges in the graph Fgl - 1.433 μs + 1.397 μs - 26.42 μs + 19.49 μs - 207.7 μs + 143.8 μs - 4.662 ms + 1.302 ms @@ -284,16 +279,16 @@ Description: Produce a list of the edges in the graph Hash-Graph - 1.025 μs + 2.598 μs - 20.02 μs + 37.63 μs - 203.4 μs + 291.1 μs - 7.747 ms + 2.461 ms @@ -301,21 +296,20 @@ Description: Produce a list of the edges in the graph SUMMARY: - * Containers was the fastest 10 times - - There was 2 ex-aequo + * Containers was the fastest 27 times + * Alga was the fastest 5 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 70.64 times faster than Alga - * Fgl was 15.72 times faster than Alga - * Hash-Graph was 11.81 times faster than Alga + * Containers was 3.99 times faster than Hash-Graph + * Alga was 3.21 times faster than Hash-Graph + * Fgl was 1.71 times faster than Hash-Graph -## vertexList +## addVertex -Description: Produce a list of the vertices in the graph +Description: Add a vertex (not already in the graph) ### Clique @@ -340,16 +334,16 @@ Description: Produce a list of the vertices in the graph Alga @@ -357,16 +351,16 @@ Description: Produce a list of the vertices in the graph Containers @@ -374,16 +368,16 @@ Description: Produce a list of the vertices in the graph Fgl @@ -391,16 +385,16 @@ Description: Produce a list of the vertices in the graph Hash-Graph
- 43.69 ns + 34.43 ns - 16.95 μs + 1.063 μs - 3.694 ms + 116.0 μs - 568.5 ms + 13.07 ms
- 32.21 ns + 94.72 ns - 151.2 ns + 638.3 ns - 1.079 μs + 39.69 μs - 10.50 μs + 23.10 ms
- 57.28 ns + 76.40 ns - 418.7 ns + 1.927 μs - 4.346 μs + 194.9 μs - 43.70 μs + 31.37 ms
- 23.51 ns + 105.5 ns - 200.8 ns + 3.527 μs - 2.230 μs + 320.9 μs - 26.49 μs + 36.07 ms
@@ -428,16 +422,16 @@ Description: Produce a list of the vertices in the graph Alga - 43.86 ns + 34.38 ns - 4.890 μs + 332.8 ns - 123.4 μs + 4.161 μs - 2.039 ms + 44.81 μs @@ -445,16 +439,16 @@ Description: Produce a list of the vertices in the graph Containers - 32.03 ns + 93.73 ns - 151.3 ns + 456.6 ns - 1.094 μs + 3.678 μs - 10.47 μs + 37.01 μs @@ -462,16 +456,16 @@ Description: Produce a list of the vertices in the graph Fgl - 53.64 ns + 74.05 ns - 426.4 ns + 804.8 ns - 4.297 μs + 9.292 μs - 43.74 μs + 95.34 μs @@ -479,16 +473,16 @@ Description: Produce a list of the vertices in the graph Hash-Graph - 23.44 ns + 102.9 ns - 201.3 ns + 1.488 μs - 2.235 μs + 17.93 μs - 26.47 μs + 207.4 μs @@ -516,16 +510,16 @@ Description: Produce a list of the vertices in the graph Alga - 8.917 μs + 510.4 ns - 259.8 μs + 9.150 μs - 2.806 ms + 72.56 μs - 31.11 ms + 612.6 μs @@ -533,16 +527,16 @@ Description: Produce a list of the vertices in the graph Containers - 190.2 ns + 606.0 ns - 950.9 ns + 5.986 μs - 3.698 μs + 33.81 μs - 17.20 μs + 240.6 μs @@ -550,16 +544,16 @@ Description: Produce a list of the vertices in the graph Fgl - 581.8 ns + 1.248 μs - 3.829 μs + 19.05 μs - 15.24 μs + 140.8 μs - 71.42 μs + 1.312 ms @@ -567,16 +561,16 @@ Description: Produce a list of the vertices in the graph Hash-Graph - 279.4 ns + 2.188 μs - 2.008 μs + 32.94 μs - 9.825 μs + 255.6 μs - 36.49 μs + 2.169 ms @@ -584,20 +578,20 @@ Description: Produce a list of the vertices in the graph SUMMARY: - * Containers was the fastest 10 times - * Hash-Graph was the fastest 2 times + * Containers was the fastest 14 times + * Alga was the fastest 10 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 525.85 times faster than Alga - * Hash-Graph was 221.43 times faster than Alga - * Fgl was 126.28 times faster than Alga + * Containers was 3.23 times faster than Hash-Graph + * Alga was 3.21 times faster than Hash-Graph + * Fgl was 1.41 times faster than Hash-Graph -## equality +## creation -Description: Test if two graphs are equals +Description: Create a graph from a list of edges ### Clique @@ -622,16 +616,16 @@ Description: Test if two graphs are equals Alga @@ -639,16 +633,16 @@ Description: Test if two graphs are equals Containers @@ -656,16 +650,16 @@ Description: Test if two graphs are equals Fgl @@ -673,16 +667,16 @@ Description: Test if two graphs are equals Hash-Graph
- 197.9 ns + 13.88 ns - 59.12 μs + 2.323 μs - 11.23 ms + 251.4 μs - 1.831 s + 24.97 ms
- 29.29 ns + 50.50 ns - 265.8 ns + 1.243 μs - 23.79 μs + 113.8 μs - 10.25 ms + 77.45 ms
- 159.2 ns + 39.34 ns - 14.75 μs + 18.45 μs - 2.701 ms + 9.162 ms - 502.5 ms + 3.363 s
- 67.59 ns + 28.50 ns - 4.211 μs + 21.99 μs - 435.5 μs + 7.145 ms - 55.84 ms + 3.608 s
@@ -710,16 +704,16 @@ Description: Test if two graphs are equals Alga - 194.3 ns + 13.70 ns - 16.17 μs + 698.7 ns - 315.1 μs + 9.213 μs - 4.912 ms + 101.9 μs @@ -727,16 +721,16 @@ Description: Test if two graphs are equals Containers - 29.20 ns + 49.45 ns - 121.8 ns + 527.6 ns - 1.111 μs + 5.944 μs - 11.95 μs + 76.86 μs @@ -744,16 +738,16 @@ Description: Test if two graphs are equals Fgl - 159.6 ns + 39.17 ns - 5.074 μs + 6.064 μs - 62.26 μs + 206.3 μs - 888.5 μs + 19.33 ms @@ -761,16 +755,16 @@ Description: Test if two graphs are equals Hash-Graph - 65.47 ns + 28.44 ns - 1.715 μs + 6.237 μs - 21.63 μs + 209.3 μs - 298.8 μs + 18.92 ms @@ -798,16 +792,16 @@ Description: Test if two graphs are equals Alga - 27.83 μs + 1.091 μs - 801.1 μs + 20.65 μs - 8.979 ms + 168.3 μs - 110.1 ms + 1.362 ms @@ -815,16 +809,16 @@ Description: Test if two graphs are equals Containers - 179.4 ns + 764.5 ns - 2.506 μs + 13.43 μs - 18.07 μs + 113.6 μs - 156.9 μs + 1.350 ms @@ -832,16 +826,16 @@ Description: Test if two graphs are equals Fgl - 7.689 μs + 10.51 μs - 136.0 μs + 520.4 μs - 2.031 ms + 18.61 ms - 30.31 ms + 594.4 ms @@ -849,16 +843,16 @@ Description: Test if two graphs are equals Hash-Graph - 2.557 μs + 11.20 μs - 39.81 μs + 526.2 μs - 326.8 μs + 17.41 ms - 3.452 ms + 573.6 ms @@ -866,21 +860,22 @@ Description: Test if two graphs are equals SUMMARY: - * Containers was the fastest 22 times + * Containers was the fastest 8 times + * Alga was the fastest 3 times - There was 2 ex-aequo + There was 1 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 442.15 times faster than Alga - * Hash-Graph was 60.95 times faster than Alga - * Fgl was 3.01 times faster than Alga + * Alga was 173.83 times faster than Hash-Graph + * Containers was 107.58 times faster than Hash-Graph + * Fgl was 1.05 times faster than Hash-Graph -## transpose +## dff -Description: Transpose (invert all the edges) the graph +Description: Produce a forest, obtained from a DFS (Deep First Search) of each vertex ### Clique @@ -905,16 +900,16 @@ Description: Transpose (invert all the edges) the graph Alga @@ -922,16 +917,50 @@ Description: Transpose (invert all the edges) the graph Containers + + + + + + + + + + + + + +
- 26.09 ns + 548.1 ns - 3.086 μs + 26.29 μs - 331.5 μs + 7.183 ms - 31.47 ms + 598.9 ms
- 89.12 ns + 114.1 ns + + 2.453 μs + + 169.7 μs + + 29.45 ms +
+ Fgl + + 210.6 ns + + 6.052 μs + + 572.3 μs + + 121.0 ms +
+ Hash-Graph + + 64.63 ns - 2.111 μs + 5.784 μs - 271.8 μs + 569.3 μs - 87.93 ms + 96.54 ms
@@ -959,16 +988,16 @@ Description: Transpose (invert all the edges) the graph Alga - 26.54 ns + 543.4 ns - 882.5 ns + 10.23 μs - 12.21 μs + 154.1 μs - 132.1 μs + 2.966 ms @@ -976,16 +1005,50 @@ Description: Transpose (invert all the edges) the graph Containers - 88.83 ns + 113.7 ns + + + 1.451 μs + + + 14.56 μs + + + 161.8 μs + + + + + Fgl + + + 208.3 ns + + + 4.572 μs + + + 70.32 μs + + + 930.3 μs + + + + + Hash-Graph + + + 64.58 ns - 924.2 ns + 2.644 μs - 10.07 μs + 50.58 μs - 120.9 μs + 1.469 ms @@ -1013,16 +1076,16 @@ Description: Transpose (invert all the edges) the graph Alga - 1.443 μs + 16.17 μs - 27.14 μs + 363.3 μs - 215.4 μs + 4.839 ms - 1.658 ms + 54.68 ms @@ -1030,16 +1093,50 @@ Description: Transpose (invert all the edges) the graph Containers - 1.386 μs + 2.209 μs + + + 23.84 μs + + + 165.5 μs + + + 3.532 ms + + + + + Fgl + + + 7.365 μs + + + 142.2 μs + + + 1.628 ms + + + 17.13 ms + + + + + Hash-Graph + + + 4.648 μs - 21.56 μs + 68.40 μs - 195.4 μs + 180.3 ns - 3.587 ms + 35.86 μs @@ -1047,20 +1144,20 @@ Description: Transpose (invert all the edges) the graph SUMMARY: - * Containers was the fastest 5 times - * Alga was the fastest 4 times - - There was 3 ex-aequo + * Containers was the fastest 8 times + * Hash-Graph was the fastest 4 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 1.96 times faster than Containers + * Hash-Graph was 587.63 times faster than Alga + * Containers was 17.82 times faster than Alga + * Fgl was 3.70 times faster than Alga -## dff +## edgeCount -Description: Produce a forest, obtained from a DFS (Deep First Search) of each vertex +Description: Count the edges of the graph ### Clique @@ -1080,21 +1177,38 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v 1000 + + + + + + + @@ -1102,16 +1216,16 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v Fgl @@ -1119,16 +1233,16 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v Hash-Graph
+ Alga + + 39.79 ns + + 15.77 μs + + 2.403 ms + + 514.6 ms +
Containers - 149.4 ns + 29.08 ns - 2.670 μs + 287.4 ns - 183.7 μs + 27.20 μs - 30.45 ms + 25.07 ms
- 222.2 ns + 35.80 ns - 6.115 μs + 1.862 μs - 570.7 μs + 199.7 μs - 121.0 ms + 134.1 ms
- 63.62 ns + 39.28 ns - 5.771 μs + 993.7 ns - 563.8 μs + 58.66 μs - 164.6 ms + 7.000 ms
@@ -1151,21 +1265,38 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v 1000 + + + Alga + + + 39.26 ns + + + 4.476 μs + + + 78.24 μs + + + 1.138 ms + + Containers - 150.9 ns + 29.42 ns - 1.440 μs + 128.8 ns - 14.84 μs + 1.190 μs - 165.4 μs + 12.25 μs @@ -1173,16 +1304,16 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v Fgl - 224.8 ns + 34.34 ns - 4.659 μs + 678.3 ns - 69.52 μs + 8.998 μs - 904.8 μs + 97.19 μs @@ -1190,16 +1321,16 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v Hash-Graph - 63.85 ns + 39.35 ns - 2.612 μs + 727.2 ns - 50.16 μs + 8.851 μs - 1.816 ms + 112.8 μs @@ -1222,21 +1353,38 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v 3 + + + Alga + + + 7.845 μs + + + 237.5 μs + + + 2.916 ms + + + 43.71 ms + + Containers - 2.174 μs + 226.7 ns - 23.36 μs + 2.355 μs - 162.7 μs + 18.51 μs - 5.045 ms + 137.4 μs @@ -1244,16 +1392,16 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v Fgl - 7.420 μs + 1.018 μs - 140.7 μs + 18.49 μs - 1.583 ms + 141.6 μs - 19.43 ms + 3.658 ms @@ -1261,16 +1409,16 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v Hash-Graph - 4.486 μs + 1.175 μs - 67.85 μs + 11.72 μs - 174.5 ns + 78.28 μs - 35.58 μs + 537.1 μs @@ -1278,21 +1426,23 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v SUMMARY: - * Containers was the fastest 8 times - * Hash-Graph was the fastest 4 times + * Containers was the fastest 11 times + * Hash-Graph was the fastest 1 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Hash-Graph was 204.72 times faster than Fgl - * Containers was 4.32 times faster than Fgl + * Hash-Graph was 63.01 times faster than Alga + * Containers was 47.91 times faster than Alga + * Fgl was 5.60 times faster than Alga -## topSort -Description: Topological sorting of the vertices +## edgeList -### Mesh +Description: Produce a list of the edges in the graph + +### Clique + + + + + + + @@ -1332,16 +1499,16 @@ Description: Topological sorting of the vertices Fgl @@ -1349,21 +1516,21 @@ Description: Topological sorting of the vertices Hash-Graph
@@ -1310,21 +1460,38 @@ Description: Topological sorting of the vertices 1000
+ Alga + + 34.92 ns + + 15.55 μs + + 2.355 ms + + 417.3 ms +
Containers - 143.7 ns + 36.99 ns - 1.558 μs + 855.6 ns - 15.89 μs + 77.65 μs - 179.8 μs + 24.32 ms
- 357.4 ns + 33.57 ns - 7.240 μs + 2.842 μs - 116.5 μs + 340.0 μs - 2.798 ms + 124.7 ms
- 201.9 ns + 35.24 ns - 5.748 μs + 1.817 μs - 81.12 μs + 307.3 μs - 1.181 ms + 221.1 ms
-### Clique +### Mesh + + + + + + + @@ -1403,16 +1587,16 @@ Description: Topological sorting of the vertices Fgl @@ -1420,16 +1604,16 @@ Description: Topological sorting of the vertices Hash-Graph
@@ -1381,21 +1548,38 @@ Description: Topological sorting of the vertices 1000
+ Alga + + 34.91 ns + + 4.427 μs + + 77.78 μs + + 1.200 ms +
Containers - 138.4 ns + 37.44 ns - 2.593 μs + 390.0 ns - 175.6 μs + 4.218 μs - 31.52 ms + 44.52 μs
- 353.1 ns + 32.72 ns - 9.628 μs + 1.045 μs - 891.0 μs + 12.58 μs - 154.4 ms + 137.9 μs
- 202.7 ns + 35.30 ns - 6.956 μs + 686.0 ns - 322.7 μs + 9.494 μs - 35.99 ms + 148.3 μs
@@ -1452,21 +1636,38 @@ Description: Topological sorting of the vertices 3 + + + Alga + + + 7.703 μs + + + 227.5 μs + + + 2.817 ms + + + 42.66 ms + + Containers - 2.349 μs + 568.2 ns - 24.21 μs + 7.750 μs - 166.8 μs + 54.62 μs - 4.039 ms + 452.1 μs @@ -1474,16 +1675,16 @@ Description: Topological sorting of the vertices Fgl - 11.54 μs + 1.644 μs - 190.4 μs + 26.52 μs - 3.881 ms + 203.5 μs - 33.30 ms + 4.836 ms @@ -1491,16 +1692,16 @@ Description: Topological sorting of the vertices Hash-Graph - 9.182 μs + 1.016 μs - 28.58 μs + 19.87 μs - 77.75 μs + 205.8 μs - 506.4 μs + 8.480 ms @@ -1509,18 +1710,20 @@ Description: Topological sorting of the vertices SUMMARY: * Containers was the fastest 10 times - * Hash-Graph was the fastest 2 times + + There was 2 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Hash-Graph was 23.10 times faster than Fgl - * Containers was 7.70 times faster than Fgl + * Containers was 28.31 times faster than Alga + * Fgl was 5.77 times faster than Alga + * Hash-Graph was 4.37 times faster than Alga -## reachable +## equality -Description: Produce a list of reachable vertices from a given one +Description: Test if two graphs are equals ### Clique @@ -1542,42 +1745,76 @@ Description: Produce a list of reachable vertices from a given one -
- Containers + Alga - 122.8 ns + 143.3 ns - 1.247 μs + 23.60 μs - 93.48 μs + 3.418 ms - 14.92 ms + 480.4 ms
- Fgl + Containers - 264.1 ns + 28.81 ns - 4.592 μs + 265.7 ns - 340.1 μs + 24.33 μs - 61.37 ms + 10.12 ms
- -### Mesh - + + + + + + + + + + + + + + +
+ Fgl + + 163.6 ns + + 14.02 μs + + 2.586 ms + + 516.1 ms +
+ Hash-Graph + + 65.44 ns + + 4.298 μs + + 445.4 μs + + 57.55 ms +
+ +### Mesh + @@ -1594,21 +1831,38 @@ Description: Produce a list of reachable vertices from a given one 1000 + + + + + + + @@ -1616,16 +1870,33 @@ Description: Produce a list of reachable vertices from a given one Fgl + + + + + + +
+ Alga + + 142.4 ns + + 6.585 μs + + 109.6 μs + + 1.566 ms +
Containers - 132.2 ns + 28.23 ns - 647.7 ns + 120.5 ns - 5.725 μs + 1.120 μs - 63.74 μs + 11.86 μs
- 268.4 ns + 159.4 ns + + 4.927 μs + + 61.38 μs + + 876.2 μs +
+ Hash-Graph + + 63.93 ns - 3.297 μs + 1.802 μs - 43.32 μs + 21.34 μs - 724.9 μs + 313.2 μs
@@ -1648,21 +1919,38 @@ Description: Produce a list of reachable vertices from a given one 3 + + + Alga + + + 11.00 μs + + + 331.1 μs + + + 3.898 ms + + + 53.98 ms + + Containers - 895.6 ns + 176.8 ns - 18.16 μs + 2.547 μs - 69.11 μs + 18.16 μs - 1.204 ms + 161.6 μs @@ -1670,16 +1958,33 @@ Description: Produce a list of reachable vertices from a given one Fgl - 4.869 μs + 7.555 μs - 146.7 μs + 130.4 μs + + + 1.911 ms + + + 25.34 ms + + + + + Hash-Graph + + + 2.687 μs + + + 42.88 μs - 1.066 ms + 342.5 μs - 12.62 ms + 3.117 ms @@ -1687,18 +1992,21 @@ Description: Produce a list of reachable vertices from a given one SUMMARY: - * Containers was the fastest 21 times - * Fgl was the fastest 1 times + * Containers was the fastest 22 times + + There was 2 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 2.61 times faster than Fgl + * Containers was 145.15 times faster than Fgl + * Hash-Graph was 19.17 times faster than Fgl + * Alga was 1.14 times faster than Fgl -## edgeCount +## hasEdge -Description: Count the edges of the graph +Description: Test if the given edge is in the graph (with arguments both in the graph and not in the graph (where applicable)) ### Clique @@ -1723,16 +2031,16 @@ Description: Count the edges of the graph Alga @@ -1740,16 +2048,16 @@ Description: Count the edges of the graph Containers @@ -1757,16 +2065,16 @@ Description: Count the edges of the graph Fgl @@ -1774,16 +2082,16 @@ Description: Count the edges of the graph Hash-Graph
- 52.63 ns + 40.06 ns - 38.65 μs + 1.590 μs - 7.871 ms + 177.7 μs - 1.164 s + 53.41 ms
- 28.97 ns + 28.61 ns - 275.5 ns + 108.9 ns - 26.48 μs + 1.015 μs - 22.55 ms + 10.31 μs
- 33.68 ns + 118.7 ns - 1.917 μs + 1.354 μs - 201.3 μs + 18.42 μs - 110.5 ms + 457.8 μs
- 38.25 ns + 102.5 ns - 968.3 ns + 145.3 ns - 56.22 μs + 159.6 ns - 6.186 ms + 171.0 ns
@@ -1811,16 +2119,16 @@ Description: Count the edges of the graph Alga - 52.53 ns + 39.76 ns - 9.954 μs + 497.1 ns - 200.1 μs + 4.412 μs - 3.169 ms + 62.57 μs @@ -1828,16 +2136,16 @@ Description: Count the edges of the graph Containers - 28.19 ns + 28.51 ns - 156.7 ns + 48.56 ns - 1.174 μs + 50.76 ns - 12.31 μs + 48.53 ns @@ -1845,16 +2153,16 @@ Description: Count the edges of the graph Fgl - 34.05 ns + 118.2 ns - 683.1 ns + 466.5 ns - 8.969 μs + 589.4 ns - 96.94 μs + 743.1 ns @@ -1862,16 +2170,16 @@ Description: Count the edges of the graph Hash-Graph - 38.35 ns + 101.2 ns - 717.7 ns + 142.6 ns - 8.511 μs + 149.0 ns - 111.3 μs + 160.9 ns @@ -1899,16 +2207,16 @@ Description: Count the edges of the graph Alga - 17.12 μs + 699.8 ns - 519.0 μs + 10.18 μs - 5.838 ms + 111.7 μs - 77.29 ms + 1.133 ms @@ -1916,16 +2224,16 @@ Description: Count the edges of the graph Containers - 212.2 ns + 52.76 ns - 2.207 μs + 71.55 ns - 18.15 μs + 179.3 ns - 134.0 μs + 115.8 ns @@ -1933,16 +2241,16 @@ Description: Count the edges of the graph Fgl - 1.008 μs + 515.3 ns - 18.44 μs + 1.490 μs - 141.1 μs + 8.264 μs - 3.275 ms + 8.327 μs @@ -1950,16 +2258,16 @@ Description: Count the edges of the graph Hash-Graph - 1.058 μs + 138.6 ns - 11.55 μs + 151.8 ns - 74.92 μs + 159.5 ns - 522.6 μs + 163.0 ns @@ -1967,20 +2275,22 @@ Description: Count the edges of the graph SUMMARY: - * Containers was the fastest 11 times - * Hash-Graph was the fastest 1 times + * Containers was the fastest 44 times + * Hash-Graph was the fastest 16 times + + There was 2 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Hash-Graph was 160.51 times faster than Alga - * Containers was 120.03 times faster than Alga - * Fgl was 14.88 times faster than Alga + * Hash-Graph was 60515.77 times faster than Alga + * Containers was 2735.10 times faster than Alga + * Fgl was 103.59 times faster than Alga -## hasEdge +## hasVertex -Description: Test if the given edge is in the graph (with arguments both in the graph and not in the graph (where applicable)) +Description: Test if the given vertex is in the graph ### Clique @@ -2005,16 +2315,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Alga @@ -2022,16 +2332,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Containers @@ -2039,16 +2349,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Fgl @@ -2056,16 +2366,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Hash-Graph
- 684.9 ns + 23.60 ns - 8.835 μs + 434.6 ns - 633.4 μs + 40.71 μs - 87.70 ms + 3.220 ms
- 26.87 ns + 21.96 ns - 105.9 ns + 22.53 ns - 912.4 ns + 21.98 ns - 9.293 μs + 21.84 ns
- 117.7 ns + 45.35 ns - 1.315 μs + 675.3 ns - 18.30 μs + 11.58 μs - 454.8 μs + 328.2 μs
- 97.66 ns + 25.95 ns - 140.3 ns + 31.90 ns - 155.7 ns + 36.73 ns - 170.5 ns + 42.01 ns
@@ -2093,16 +2403,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Alga - 690.6 ns + 23.37 ns - 3.492 μs + 245.6 ns - 24.63 μs + 2.418 μs - 246.1 μs + 28.08 μs @@ -2110,16 +2420,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Containers - 27.19 ns + 21.94 ns - 46.06 ns + 21.89 ns - 47.70 ns + 22.08 ns - 45.96 ns + 22.08 ns @@ -2127,16 +2437,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Fgl - 116.5 ns + 43.62 ns - 452.0 ns + 227.8 ns - 568.6 ns + 381.5 ns - 710.4 ns + 612.1 ns @@ -2144,16 +2454,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Hash-Graph - 101.5 ns + 25.63 ns - 138.1 ns + 35.64 ns - 144.7 ns + 37.29 ns - 154.0 ns + 42.43 ns @@ -2181,16 +2491,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Alga - 4.543 μs + 274.2 ns - 54.58 μs + 2.671 μs - 413.7 μs + 39.84 μs - 3.298 ms + 232.8 μs @@ -2198,16 +2508,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Containers - 53.55 ns + 22.76 ns - 45.81 ns + 22.14 ns - 84.25 ns + 22.46 ns - 149.5 ns + 22.03 ns @@ -2215,16 +2525,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Fgl - 479.0 ns + 269.2 ns - 1.207 μs + 1.031 μs - 6.100 μs + 2.569 μs - 8.765 μs + 3.454 μs @@ -2232,16 +2542,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Hash-Graph - 133.2 ns + 32.64 ns - 143.2 ns + 38.79 ns - 156.9 ns + 35.49 ns - 158.9 ns + 41.28 ns @@ -2249,18 +2559,17 @@ Description: Test if the given edge is in the graph (with arguments both in the SUMMARY: - * Containers was the fastest 46 times - * Hash-Graph was the fastest 14 times + * Containers was the fastest 38 times - There was 2 ex-aequo + There was 6 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Hash-Graph was 180132.41 times faster than Alga - * Containers was 8859.28 times faster than Alga - * Fgl was 329.42 times faster than Alga + * Containers was 34.99 times faster than Alga + * Hash-Graph was 18.68 times faster than Alga + * Fgl was 4.68 times faster than Alga ## isEmpty @@ -2289,16 +2598,33 @@ Description: Test if the graph is empty Alga - 20.11 ns + 19.58 ns + + + 30.63 ns + + + 30.58 ns + + + 31.47 ns + + + + + Containers + + + 19.22 ns - 30.64 ns + 18.39 ns - 30.59 ns + 18.47 ns - 31.07 ns + 18.35 ns @@ -2306,16 +2632,16 @@ Description: Test if the graph is empty Fgl - 19.05 ns + 18.68 ns - 18.69 ns + 17.97 ns - 18.48 ns + 18.17 ns - 18.40 ns + 18.76 ns @@ -2323,16 +2649,16 @@ Description: Test if the graph is empty Hash-Graph - 18.53 ns + 18.05 ns - 19.01 ns + 17.91 ns - 18.59 ns + 17.88 ns - 18.44 ns + 17.96 ns @@ -2360,16 +2686,33 @@ Description: Test if the graph is empty Alga - 19.63 ns + 19.15 ns - 31.05 ns + 30.79 ns - 31.41 ns + 30.72 ns - 30.63 ns + 30.72 ns + + + + + Containers + + + 18.67 ns + + + 18.40 ns + + + 18.54 ns + + + 18.68 ns @@ -2377,16 +2720,16 @@ Description: Test if the graph is empty Fgl - 18.82 ns + 17.95 ns - 18.39 ns + 18.07 ns - 18.69 ns + 18.07 ns - 18.69 ns + 18.20 ns @@ -2394,16 +2737,16 @@ Description: Test if the graph is empty Hash-Graph - 19.01 ns + 18.09 ns - 18.69 ns + 17.98 ns - 18.56 ns + 18.06 ns - 18.50 ns + 17.95 ns @@ -2431,16 +2774,33 @@ Description: Test if the graph is empty Alga - 31.39 ns + 30.58 ns + + + 30.77 ns + + + 31.19 ns + + + 30.54 ns + + + + + Containers + + + 18.70 ns - 30.51 ns + 18.36 ns - 30.47 ns + 19.00 ns - 30.87 ns + 18.51 ns @@ -2448,16 +2808,16 @@ Description: Test if the graph is empty Fgl - 18.91 ns + 18.49 ns - 18.69 ns + 18.15 ns - 18.94 ns + 21.26 ns - 18.79 ns + 18.14 ns @@ -2465,16 +2825,16 @@ Description: Test if the graph is empty Hash-Graph - 18.45 ns + 18.01 ns - 18.56 ns + 17.94 ns - 18.61 ns + 17.90 ns - 18.77 ns + 17.90 ns @@ -2489,12 +2849,13 @@ SUMMARY: ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Hash-Graph was 1.66 times faster than Alga - * Fgl was 1.66 times faster than Alga + * Hash-Graph was 1.72 times faster than Alga + * Fgl was 1.68 times faster than Alga + * Containers was 1.67 times faster than Alga -## vertexCount +## mergeContext -Description: Count the vertices of the graph +Description: Merge a FGL context in the graph ### Clique @@ -2514,38 +2875,21 @@ Description: Count the vertices of the graph 1000 - - - - - - - @@ -2553,16 +2897,16 @@ Description: Count the vertices of the graph Hash-Graph
- Alga - - 28.81 ns - - 16.40 μs - - 3.606 ms - - 568.4 ms -
Fgl - 22.20 ns + 114.0 ns - 103.3 ns + 2.036 μs - 928.6 ns + 193.0 μs - 10.54 μs + 34.34 ms
- 22.76 ns + 113.4 ns - 94.22 ns + 3.419 μs - 809.5 ns + 321.8 μs - 8.913 μs + 41.05 ms
@@ -2585,38 +2929,21 @@ Description: Count the vertices of the graph 1000 - - - Alga - - - 29.67 ns - - - 4.675 μs - - - 122.1 μs - - - 2.079 ms - - Fgl - 22.24 ns + 113.9 ns - 102.2 ns + 896.2 ns - 952.0 ns + 9.651 μs - 10.83 μs + 97.22 μs @@ -2624,16 +2951,16 @@ Description: Count the vertices of the graph Hash-Graph - 22.80 ns + 110.7 ns - 86.34 ns + 1.408 μs - 791.6 ns + 18.13 μs - 9.149 μs + 214.6 μs @@ -2656,38 +2983,21 @@ Description: Count the vertices of the graph 3 - - - Alga - - - 8.662 μs - - - 255.8 μs - - - 2.845 ms - - - 31.71 ms - - Fgl - 153.7 ns + 1.375 μs - 790.4 ns + 19.56 μs - 3.562 μs + 146.4 μs - 17.27 μs + 1.936 ms @@ -2695,37 +3005,39 @@ Description: Count the vertices of the graph Hash-Graph - 120.4 ns + 2.169 μs - 740.7 ns + 33.83 μs - 3.349 μs + 258.2 μs - 13.93 μs + 2.849 ms +Not implemented for Containers because it is a nonsense. +Not implemented for Alga because it is a nonsense. SUMMARY: - * Hash-Graph was the fastest 7 times + * Fgl was the fastest 28 times + * Hash-Graph was the fastest 2 times - There was 5 ex-aequo + There was 6 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Hash-Graph was 22090.79 times faster than Alga - * Fgl was 18657.82 times faster than Alga + * Fgl was 1.53 times faster than Hash-Graph -## hasVertex +## reachable -Description: Test if the given vertex is in the graph +Description: Produce a list of reachable vertices from a given one ### Clique @@ -2750,16 +3062,33 @@ Description: Test if the given vertex is in the graph Alga + + + + + + + @@ -2767,16 +3096,16 @@ Description: Test if the given vertex is in the graph Fgl @@ -2784,16 +3113,16 @@ Description: Test if the given vertex is in the graph Hash-Graph
- 31.03 ns + 769.4 ns + + 21.87 μs + + 3.904 ms + + 518.2 ms +
+ Containers + + 120.2 ns - 611.4 ns + 1.094 μs - 49.66 μs + 83.82 μs - 4.544 ms + 15.32 ms
- 53.01 ns + 260.0 ns - 674.5 ns + 4.841 μs - 11.56 μs + 329.5 μs - 341.5 μs + 62.33 ms
- 24.90 ns + 64.45 ns - 34.12 ns + 2.910 μs - 37.19 ns + 287.2 μs - 41.01 ns + 59.75 ms
@@ -2821,16 +3150,33 @@ Description: Test if the given vertex is in the graph Alga - 31.16 ns + 776.2 ns + + + 8.444 μs + + + 128.1 μs + + + 2.545 ms + + + + + Containers + + + 119.7 ns - 285.3 ns + 594.2 ns - 3.570 μs + 6.015 μs - 39.92 μs + 62.93 μs @@ -2838,16 +3184,16 @@ Description: Test if the given vertex is in the graph Fgl - 52.86 ns + 261.1 ns - 236.5 ns + 3.234 μs - 349.3 ns + 43.54 μs - 566.9 ns + 734.7 μs @@ -2855,16 +3201,16 @@ Description: Test if the given vertex is in the graph Hash-Graph - 24.84 ns + 64.20 ns - 32.95 ns + 1.445 μs - 37.07 ns + 26.26 μs - 41.14 ns + 883.1 μs @@ -2892,16 +3238,33 @@ Description: Test if the given vertex is in the graph Alga - 380.2 ns + 13.25 μs + + + 358.0 μs + + + 4.037 ms + + + 53.31 ms + + + + + Containers + + + 872.5 ns - 5.295 μs + 18.15 μs - 59.95 μs + 71.23 μs - 315.4 μs + 1.355 ms @@ -2909,16 +3272,16 @@ Description: Test if the given vertex is in the graph Fgl - 239.4 ns + 4.958 μs - 985.9 ns + 153.2 μs - 1.741 μs + 1.118 ms - 3.542 μs + 16.03 ms @@ -2926,16 +3289,16 @@ Description: Test if the given vertex is in the graph Hash-Graph - 33.07 ns + 2.331 μs - 36.65 ns + 66.86 μs - 36.80 ns + 491.6 μs - 40.92 ns + 8.157 ms @@ -2943,29 +3306,26 @@ Description: Test if the given vertex is in the graph SUMMARY: - * Hash-Graph was the fastest 37 times - - There was 7 ex-aequo + * Containers was the fastest 12 times + * Hash-Graph was the fastest 10 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Hash-Graph was 49670.26 times faster than Alga - * Fgl was 36415.71 times faster than Alga + * Hash-Graph was 338.06 times faster than Alga + * Containers was 48.66 times faster than Alga + * Fgl was 22.59 times faster than Alga -## addEdge +## removeEdge -Description: Add an edge (not already in the graph) +Description: Remove an edge of the graph ### Clique - @@ -2981,50 +3341,55 @@ Description: Add an edge (not already in the graph) Alga - - + + + + +
- 1 - 10 - 46.95 ns - - 1.075 μs + 15.64 μs - 109.0 μs + 7.211 ms - 15.53 ms + 1.042 s
- Fgl + Containers - 121.8 ns - - 2.058 μs + 628.8 ns - 193.4 μs + 39.29 μs - 28.93 ms + 23.83 ms
- Hash-Graph + Fgl - 168.0 ns + 4.409 μs + + 230.5 μs + + 31.09 ms
+ Hash-Graph + - 4.182 μs + 3.950 μs - 367.9 μs + 370.1 μs - 39.65 ms + 41.65 ms
@@ -3034,9 +3399,6 @@ Description: Add an edge (not already in the graph) - - 1 - 10 @@ -3052,16 +3414,27 @@ Description: Add an edge (not already in the graph) Alga - 48.52 ns + 4.738 μs - 378.0 ns + 67.92 μs + + + 1.718 ms + + + + + Containers + + + 366.7 ns - 4.537 μs + 2.835 μs - 42.54 μs + 27.66 μs @@ -3069,16 +3442,13 @@ Description: Add an edge (not already in the graph) Fgl - 122.5 ns - - - 990.4 ns + 1.595 μs - 9.444 μs + 10.36 μs - 93.67 μs + 94.87 μs @@ -3086,16 +3456,13 @@ Description: Add an edge (not already in the graph) Hash-Graph - 170.0 ns + 1.581 μs - 1.837 μs - - - 20.10 μs + 19.19 μs - 240.4 μs + 226.6 μs @@ -3123,16 +3490,33 @@ Description: Add an edge (not already in the graph) Alga - 577.0 ns + 7.465 μs - 8.854 μs + 161.5 μs - 70.72 μs + 5.385 ms - 606.1 μs + 47.57 ms + + + + + Containers + + + 481.5 ns + + + 5.237 μs + + + 31.19 μs + + + 220.0 μs @@ -3140,16 +3524,16 @@ Description: Add an edge (not already in the graph) Fgl - 1.427 μs + 1.955 μs - 19.23 μs + 24.81 μs - 140.4 μs + 168.4 μs - 1.276 ms + 1.344 ms @@ -3157,35 +3541,31 @@ Description: Add an edge (not already in the graph) Hash-Graph - 2.720 μs + 2.386 μs - 36.76 μs + 37.06 μs - 296.4 μs + 282.0 μs - 2.690 ms + 2.456 ms -SUMMARY: - - * Alga was the fastest 42 times - - ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 3.79 times faster than Hash-Graph - * Fgl was 1.86 times faster than Hash-Graph + * Containers was 68.71 times faster than Alga + * Fgl was 27.98 times faster than Alga + * Hash-Graph was 17.97 times faster than Alga -## addVertex +## removeVertex -Description: Add a vertex (not already in the graph) +Description: Remove a vertex of the graph ### Clique @@ -3210,16 +3590,33 @@ Description: Add a vertex (not already in the graph) Alga + + + + + + + @@ -3227,16 +3624,16 @@ Description: Add a vertex (not already in the graph) Fgl @@ -3244,16 +3641,16 @@ Description: Add a vertex (not already in the graph) Hash-Graph
- 37.60 ns + 32.13 ns + + 3.271 μs + + 434.7 μs + + 185.6 ms +
+ Containers + + 34.32 ns - 1.117 μs + 774.8 ns - 108.6 μs + 45.14 μs - 16.58 ms + 31.03 ms
- 72.50 ns + 82.62 ns - 1.847 μs + 2.513 μs - 186.6 μs + 226.4 μs - 28.83 ms + 34.19 ms
- 104.8 ns + 78.36 ns - 4.073 μs + 6.755 μs - 339.5 μs + 436.8 μs - 39.46 ms + 43.90 ms
@@ -3281,16 +3678,33 @@ Description: Add a vertex (not already in the graph) Alga - 37.31 ns + 32.20 ns - 362.5 ns + 1.016 μs - 4.020 μs + 13.97 μs - 41.96 μs + 165.0 μs + + + + + Containers + + + 35.60 ns + + + 586.8 ns + + + 6.812 μs + + + 69.79 μs @@ -3298,16 +3712,16 @@ Description: Add a vertex (not already in the graph) Fgl - 73.16 ns + 84.25 ns - 801.2 ns + 954.6 ns - 8.965 μs + 9.853 μs - 93.78 μs + 96.05 μs @@ -3315,16 +3729,16 @@ Description: Add a vertex (not already in the graph) Hash-Graph - 104.7 ns + 78.72 ns - 1.552 μs + 2.449 μs - 19.45 μs + 19.95 μs - 229.2 μs + 219.2 μs @@ -3352,16 +3766,33 @@ Description: Add a vertex (not already in the graph) Alga - 549.4 ns + 1.615 μs - 10.60 μs + 29.94 μs - 70.11 μs + 277.7 μs - 698.8 μs + 3.561 ms + + + + + Containers + + + 884.0 ns + + + 8.698 μs + + + 45.29 μs + + + 313.3 μs @@ -3369,16 +3800,16 @@ Description: Add a vertex (not already in the graph) Fgl - 1.256 μs + 1.391 μs - 18.65 μs + 21.22 μs - 141.7 μs + 146.7 μs - 1.269 ms + 1.389 ms @@ -3386,16 +3817,16 @@ Description: Add a vertex (not already in the graph) Hash-Graph - 2.417 μs + 3.112 μs - 35.31 μs + 39.53 μs - 293.2 μs + 279.6 μs - 2.701 ms + 2.492 ms @@ -3403,18 +3834,23 @@ Description: Add a vertex (not already in the graph) SUMMARY: - * Alga was the fastest 24 times + * Containers was the fastest 26 times + * Alga was the fastest 1 times + * Fgl was the fastest 1 times + + There was 2 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 3.48 times faster than Hash-Graph - * Fgl was 1.82 times faster than Hash-Graph + * Containers was 4.42 times faster than Alga + * Fgl was 2.77 times faster than Alga + * Hash-Graph was 1.70 times faster than Alga -## removeVertex +## topSort -Description: Remove a vertex of the graph +Description: Topological sorting of the vertices ### Clique @@ -3439,16 +3875,33 @@ Description: Remove a vertex of the graph Alga + + + + + + + @@ -3456,16 +3909,16 @@ Description: Remove a vertex of the graph Fgl @@ -3473,16 +3926,16 @@ Description: Remove a vertex of the graph Hash-Graph
- 33.53 ns + 595.1 ns - 3.193 μs + 27.83 μs - 436.0 μs + 4.820 ms - 157.6 ms + 590.4 ms +
+ Containers + + 151.7 ns + + 2.575 μs + + 169.9 μs + + 29.00 ms
- 62.66 ns + 364.8 ns - 2.294 μs + 9.665 μs - 195.7 μs + 815.5 μs - 28.71 ms + 142.0 ms
- 71.09 ns + 206.9 ns - 8.007 μs + 6.902 μs - 605.2 μs + 333.6 μs - 57.93 ms + 35.96 ms
@@ -3510,16 +3963,33 @@ Description: Remove a vertex of the graph Alga - 33.02 ns + 601.7 ns + + + 11.20 μs + + + 170.3 μs + + + 3.392 ms + + + + + Containers + + + 150.6 ns - 966.4 ns + 1.573 μs - 14.14 μs + 15.67 μs - 167.4 μs + 180.3 μs @@ -3527,16 +3997,16 @@ Description: Remove a vertex of the graph Fgl - 66.09 ns + 371.4 ns - 908.5 ns + 7.099 μs - 9.363 μs + 113.5 μs - 93.31 μs + 2.463 ms @@ -3544,16 +4014,16 @@ Description: Remove a vertex of the graph Hash-Graph - 70.98 ns + 206.1 ns - 2.718 μs + 5.585 μs - 28.32 μs + 80.88 μs - 316.3 μs + 1.132 ms @@ -3581,16 +4051,33 @@ Description: Remove a vertex of the graph Alga - 1.510 μs + 17.55 μs + + + 366.2 μs + + + 4.939 ms + + + 54.15 ms + + + + + Containers + + + 2.457 μs - 31.23 μs + 24.73 μs - 279.1 μs + 171.2 μs - 3.279 ms + 4.128 ms @@ -3598,16 +4085,16 @@ Description: Remove a vertex of the graph Fgl - 1.346 μs + 11.37 μs - 20.35 μs + 189.8 μs - 142.6 μs + 3.075 ms - 1.281 ms + 26.39 ms @@ -3615,16 +4102,16 @@ Description: Remove a vertex of the graph Hash-Graph - 3.988 μs + 8.958 μs - 58.10 μs + 28.32 μs - 423.1 μs + 76.62 μs - 3.384 ms + 497.9 μs @@ -3632,27 +4119,30 @@ Description: Remove a vertex of the graph SUMMARY: - * Fgl was the fastest 18 times - * Alga was the fastest 4 times - - There was 2 ex-aequo + * Containers was the fastest 10 times + * Hash-Graph was the fastest 2 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Fgl was 3.28 times faster than Alga - * Hash-Graph was 1.44 times faster than Alga + * Hash-Graph was 51.86 times faster than Alga + * Containers was 16.81 times faster than Alga + * Fgl was 2.43 times faster than Alga -## removeEdge -Description: Remove an edge of the graph +## transpose + +Description: Transpose (invert all the edges) the graph ### Clique + @@ -3668,13 +4158,33 @@ Description: Remove an edge of the graph Alga + + + + + + + + @@ -3682,13 +4192,16 @@ Description: Remove an edge of the graph Fgl + @@ -3696,13 +4209,16 @@ Description: Remove an edge of the graph Hash-Graph +
+ 1 + 10 - 17.85 μs + 25.55 ns + + 3.103 μs - 7.458 ms + 332.1 μs - 1.165 s + 34.05 ms +
+ Containers + + 87.48 ns + + 2.092 μs + + 270.2 μs + + 87.50 ms
- 4.396 μs + 121.3 ns + + 13.60 μs - 223.5 μs + 2.552 ms - 31.67 ms + 415.0 ms
- 4.188 μs + 52.01 ns - 395.0 μs + 13.77 μs + + 4.095 ms - 39.31 ms + 740.4 ms
@@ -3712,6 +4228,9 @@ Description: Remove an edge of the graph + + 1 + 10 @@ -3727,13 +4246,33 @@ Description: Remove an edge of the graph Alga - 5.339 μs + 26.32 ns + + + 902.8 ns - 74.00 μs + 12.38 μs - 2.022 ms + 130.0 μs + + + + + Containers + + + 87.29 ns + + + 885.1 ns + + + 9.721 μs + + + 115.7 μs @@ -3741,13 +4280,16 @@ Description: Remove an edge of the graph Fgl - 1.511 μs + 115.8 ns + + + 4.330 μs - 10.14 μs + 56.55 μs - 94.80 μs + 731.0 μs @@ -3755,13 +4297,16 @@ Description: Remove an edge of the graph Hash-Graph - 1.531 μs + 50.45 ns + + + 2.958 μs - 19.98 μs + 51.49 μs - 230.6 μs + 1.154 ms @@ -3789,16 +4334,33 @@ Description: Remove an edge of the graph Alga - 8.463 μs + 1.450 μs - 172.9 μs + 26.13 μs - 4.821 ms + 250.7 μs - 50.37 ms + 2.061 ms + + + + + Containers + + + 1.347 μs + + + 21.21 μs + + + 195.3 μs + + + 3.898 ms @@ -3806,16 +4368,16 @@ Description: Remove an edge of the graph Fgl - 1.970 μs + 7.178 μs - 23.70 μs + 126.2 μs - 155.1 μs + 1.824 ms - 1.342 ms + 17.97 ms @@ -3823,16 +4385,16 @@ Description: Remove an edge of the graph Hash-Graph - 2.438 μs + 4.816 μs - 39.85 μs + 143.2 μs - 304.7 μs + 3.048 ms - 2.689 ms + 25.97 ms @@ -3840,20 +4402,22 @@ Description: Remove an edge of the graph SUMMARY: - * Fgl was the fastest 25 times + * Containers was the fastest 6 times + * Alga was the fastest 4 times - There was 5 ex-aequo + There was 2 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Fgl was 31.87 times faster than Alga - * Hash-Graph was 19.08 times faster than Alga + * Alga was 14.52 times faster than Hash-Graph + * Containers was 8.14 times faster than Hash-Graph + * Fgl was 1.59 times faster than Hash-Graph -## mergeContext +## vertexCount -Description: Merge a FGL context in the graph +Description: Count the vertices of the graph ### Clique @@ -3873,21 +4437,55 @@ Description: Merge a FGL context in the graph 1000 + + + + + + + + + + + + + + @@ -3895,16 +4493,16 @@ Description: Merge a FGL context in the graph Hash-Graph
+ Alga + + 30.70 ns + + 1.641 μs + + 333.0 μs + + 78.40 ms +
+ Containers + + 20.68 ns + + 21.08 ns + + 20.70 ns + + 21.08 ns +
Fgl - 109.6 ns + 20.91 ns - 1.889 μs + 100.4 ns - 184.1 μs + 939.2 ns - 28.96 ms + 10.12 μs
- 115.1 ns + 22.34 ns - 3.655 μs + 88.78 ns - 341.3 μs + 783.7 ns - 40.01 ms + 8.315 μs
@@ -3927,21 +4525,55 @@ Description: Merge a FGL context in the graph 1000 + + + Alga + + + 31.27 ns + + + 536.3 ns + + + 9.404 μs + + + 145.8 μs + + + + + Containers + + + 21.33 ns + + + 20.89 ns + + + 21.57 ns + + + 20.93 ns + + Fgl - 108.9 ns + 21.27 ns - 895.8 ns + 101.8 ns - 9.254 μs + 902.7 ns - 92.39 μs + 9.976 μs @@ -3949,16 +4581,16 @@ Description: Merge a FGL context in the graph Hash-Graph - 115.4 ns + 22.51 ns - 1.527 μs + 83.41 ns - 19.73 μs + 792.4 ns - 228.6 μs + 8.361 μs @@ -3981,21 +4613,55 @@ Description: Merge a FGL context in the graph 3 + + + Alga + + + 989.4 ns + + + 27.31 μs + + + 419.4 μs + + + 6.483 ms + + + + + Containers + + + 20.85 ns + + + 22.58 ns + + + 20.94 ns + + + 21.19 ns + + Fgl - 1.345 μs + 132.8 ns - 19.05 μs + 733.1 ns - 140.1 μs + 3.387 μs - 1.248 ms + 16.86 μs @@ -4003,16 +4669,16 @@ Description: Merge a FGL context in the graph Hash-Graph - 2.316 μs + 117.2 ns - 36.87 μs + 700.9 ns - 302.6 μs + 3.330 μs - 2.643 ms + 13.14 μs @@ -4020,20 +4686,22 @@ Description: Merge a FGL context in the graph SUMMARY: - * Fgl was the fastest 33 times - * Hash-Graph was the fastest 2 times + * Containers was the fastest 10 times - There was 1 ex-aequo + There was 2 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Fgl was 1.87 times faster than Hash-Graph + * Containers was 20395.10 times faster than Alga + * Hash-Graph was 45.21 times faster than Alga + * Fgl was 36.97 times faster than Alga -## creation -Description: Create a graph from a list of edges +## vertexList + +Description: Produce a list of the vertices in the graph ### Clique @@ -4058,16 +4726,16 @@ Description: Create a graph from a list of edges Alga @@ -4075,16 +4743,16 @@ Description: Create a graph from a list of edges Containers @@ -4092,16 +4760,16 @@ Description: Create a graph from a list of edges Fgl @@ -4109,16 +4777,16 @@ Description: Create a graph from a list of edges Hash-Graph
- 17.34 ns + 41.16 ns - 3.518 μs + 2.182 μs - 406.1 μs + 334.0 μs - 40.31 ms + 77.93 ms
- 49.89 ns + 31.64 ns - 1.214 μs + 151.8 ns - 150.1 μs + 1.044 μs - 78.92 ms + 10.23 μs
- 38.99 ns + 49.90 ns - 18.55 μs + 416.8 ns - 13.79 ms + 4.158 μs - 3.465 s + 42.37 μs
- 28.98 ns + 23.04 ns - 24.35 μs + 200.6 ns - 6.629 ms + 2.224 μs - 3.431 s + 26.18 μs
@@ -4146,16 +4814,16 @@ Description: Create a graph from a list of edges Alga - 17.57 ns + 40.90 ns - 1.056 μs + 724.2 ns - 13.72 μs + 10.21 μs - 158.1 μs + 153.1 μs @@ -4163,16 +4831,16 @@ Description: Create a graph from a list of edges Containers - 49.98 ns + 32.02 ns - 528.9 ns + 148.0 ns - 5.645 μs + 1.047 μs - 76.42 μs + 10.34 μs @@ -4180,16 +4848,16 @@ Description: Create a graph from a list of edges Fgl - 42.25 ns + 50.35 ns - 6.187 μs + 413.9 ns - 211.8 μs + 4.175 μs - 18.53 ms + 42.46 μs @@ -4197,16 +4865,16 @@ Description: Create a graph from a list of edges Hash-Graph - 29.66 ns + 22.92 ns - 6.947 μs + 201.1 ns - 218.9 μs + 2.225 μs - 18.79 ms + 26.16 μs @@ -4234,16 +4902,16 @@ Description: Create a graph from a list of edges Alga - 1.618 μs + 1.133 μs - 31.57 μs + 28.39 μs - 265.1 μs + 419.0 μs - 2.118 ms + 7.368 ms @@ -4251,16 +4919,16 @@ Description: Create a graph from a list of edges Containers - 870.8 ns + 189.2 ns - 14.93 μs + 916.3 ns - 115.4 μs + 3.664 μs - 1.367 ms + 17.00 μs @@ -4268,16 +4936,16 @@ Description: Create a graph from a list of edges Fgl - 10.65 μs + 606.5 ns - 539.6 μs + 3.654 μs - 18.49 ms + 14.88 μs - 556.6 ms + 71.00 μs @@ -4285,16 +4953,16 @@ Description: Create a graph from a list of edges Hash-Graph - 13.51 μs + 278.4 ns - 565.9 μs + 2.005 μs - 18.11 ms + 9.463 μs - 555.6 ms + 36.20 μs @@ -4302,14 +4970,13 @@ Description: Create a graph from a list of edges SUMMARY: - * Containers was the fastest 9 times - * Alga was the fastest 3 times + * Containers was the fastest 10 times + * Hash-Graph was the fastest 2 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 105.15 times faster than Fgl - * Containers was 102.19 times faster than Fgl - * Hash-Graph was 1.01 times faster than Fgl - + * Containers was 42.88 times faster than Alga + * Hash-Graph was 17.94 times faster than Alga + * Fgl was 10.35 times faster than Alga From e77499bb1258ad79ad339b316931703f88768067 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Sun, 5 Aug 2018 22:11:49 +0200 Subject: [PATCH 07/25] Add svg --- results/TIME.svg | 4569 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 4569 insertions(+) create mode 100644 results/TIME.svg diff --git a/results/TIME.svg b/results/TIME.svg new file mode 100644 index 0000000..4bbb42f --- /dev/null +++ b/results/TIME.svg @@ -0,0 +1,4569 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From b695aab34af71e447b66086166d918e940f8db12 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Mon, 6 Aug 2018 14:22:31 +0200 Subject: [PATCH 08/25] Better chart --- bench/Space.hs | 4 +- bench/Time.hs | 4 +- results/TIME.svg | 7025 ++++++++++++++++++++------------ src/BenchGraph/Render/Chart.hs | 28 +- 4 files changed, 4344 insertions(+), 2717 deletions(-) diff --git a/bench/Space.hs b/bench/Space.hs index c10deab..49bda48 100644 --- a/bench/Space.hs +++ b/bench/Space.hs @@ -1,7 +1,7 @@ {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} {-# LANGUAGE CPP #-} -import Data.List (nub, nubBy, sortBy, elemIndices) +import Data.List (nub, nubBy, sort, sortBy, elemIndices) import Data.Function (on) import Data.Maybe (mapMaybe, catMaybes, isJust) import Data.Int (Int64) @@ -189,7 +189,7 @@ main' (Run only notonly flg libs _ _ _) = do benchsNames :: Maybe Option -> Maybe [String] -> [String] benchsNames only notonly = nub $ useNotOnly $ useOnly extractedNames where - extractedNames = "creation" : map (\(_,Shadow s) -> either fst name s) listOfSuites + extractedNames = sort $ "creation" : map (\(_,Shadow s) -> either fst name s) listOfSuites useOnly = case only of Nothing -> id (Just (Only lst)) -> filter (`elem` lst) diff --git a/bench/Time.hs b/bench/Time.hs index 0a62734..c7ba843 100644 --- a/bench/Time.hs +++ b/bench/Time.hs @@ -226,12 +226,12 @@ main' opts per = length grNames `div` two f = if one' + 1 == two then id else take (one*per) in drop ((one-1)*per) $ f grNames - samples = sortBy (on compare (either fst showBenchName . snd)) $ filter (\(_,n) -> let nam = either fst showBenchName n in nam `elem` todo && nam `notElem` nottodo) grList' + samples = filter (\(_,n) -> let nam = either fst showBenchName n in nam `elem` todo && nam `notElem` nottodo) grList' unless (staOut flg == QuickComparison) $ printHeader gr $ nub $ map (either fst showBenchName . snd) samples genReport gr flg samples where grNames = nub $ map (either fst showBenchName . snd) $ grList False False defaultGr - grList benchWithCreation dontBenchLittleOnes gr = + grList benchWithCreation dontBenchLittleOnes gr = sortBy (on compare (either fst showBenchName . snd)) $ map (fmap (\(Shadow s) -> second (allBench benchWithCreation dontBenchLittleOnes gr) s)) listOfSuites ++ listOfCreation dontBenchLittleOnes gr mkGr gr' = case gr' of diff --git a/results/TIME.svg b/results/TIME.svg index 4bbb42f..c966c60 100644 --- a/results/TIME.svg +++ b/results/TIME.svg @@ -1,4569 +1,6194 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/BenchGraph/Render/Chart.hs b/src/BenchGraph/Render/Chart.hs index eb6a88d..a63eb8a 100644 --- a/src/BenchGraph/Render/Chart.hs +++ b/src/BenchGraph/Render/Chart.hs @@ -25,10 +25,10 @@ import BenchGraph.Render.Common import BenchGraph.Utils fixGap1 :: Double -fixGap1 = 10 +fixGap1 = 15 fixGap2 :: Double -fixGap2 = 20 +fixGap2 = 10 mkChart :: String -- ^ The name of the benchs @@ -48,14 +48,14 @@ mkChart title gparam s (ChartOutput filename chopt) grouped' = where -- Group the benchs per line of 4 items grouped = either (map (fmap (fmap Left))) (map (fmap (fmap Right))) grouped' - grp = group 4 grouped + grp = group 3 grouped grid = wideAbove title' $ wideAbove graphsInfo $ wideAbove legend' $ aboveN $ map (besideN . map (layoutToGrid . set layout_legend Nothing . layout)) grp where -- Custom title title' = setPickFn nullPickFn $ label ls HTA_Centre VTA_Centre title - ls = def { _font_size = 20 , _font_weight = FontWeightBold } + ls = def { _font_size = 25 , _font_weight = FontWeightBold } -- Infor about graphs used graphsInfo = setPickFn nullPickFn $ label ls' HTA_Centre VTA_Centre $ (++) "Graphs used: " $ intercalate ", " $ map (\((n,f),xs) -> @@ -63,24 +63,27 @@ mkChart title gparam s (ChartOutput filename chopt) grouped' = "RealLife" -> unwords [n,"number",show $ snd $ f $ last xs] _ -> unwords [n,"with",show $ snd $ f $ last xs,"vertices"]) $ graphs True gparam - ls' = def { _font_size = 15 , _font_weight = FontWeightNormal } + ls' = def { _font_size = 20 , _font_weight = FontWeightNormal } -- Recreate the legend legend' = setPickFn nullPickFn $ toRenderable $ Legend legendStyle legendInfo hhgrp = Simple True "" $ Left $ zip (S.toList is) (replicate (S.size is) 0) -- False data to generate the legend - legendStyle = fromJust $ _layout_legend $ layout ("",hhgrp) + legendStyle = legend_label_style . font_size .~ 17 $ fromJust $ _layout_legend $ layout ("",hhgrp) legendInfo = _plot_legend $ head $ _layout_plots $ layout ("",hhgrp) -- Render to svg (fo,foExt) = case chopt of - Png -> (def, "png") - Svg -> (def {_fo_format = SVG},"svg") + Png -> (def', "png") + Svg -> (def' {_fo_format = SVG},"svg") + def' = def {_fo_size = (1200,1800)} layout e = layout_title .~ fst e - $ layout_title_style . font_size .~ 10 - $ layout_x_axis . laxis_style . axis_label_style . font_size .~ 8 + $ layout_title_style . font_size .~ 17 + $ layout_left_axis_visibility . axis_show_ticks .~ True + $ layout_y_axis . laxis_style . axis_line_style . line_width .~ 0.5 + $ layout_x_axis . laxis_style . axis_label_style . font_size .~ 15 $ layout_x_axis . laxis_generate .~ autoIndexAxis (M.keys mapVal) - $ layout_y_axis . laxis_override .~ (over axis_labels (\x -> [map (\(y,_) -> (y,s $ 10**(y - fromIntegral expo))) $ head x]) . axisGridHide ) -- Change the label with the corresponding 10 power + $ layout_y_axis . laxis_override .~ over axis_labels (\x -> [map (\(y,_) -> (y,s $ 10**(y - fromIntegral expo))) $ head x]) -- Change the label with the corresponding 10 power $ layout_left_axis_visibility . axis_show_ticks .~ False $ layout_plots .~ lay_plots $ def :: Layout PlotIndex Double @@ -124,7 +127,7 @@ mkChart title gparam s (ChartOutput filename chopt) grouped' = barsErrs v = plot_errbars_values .~ mkErrPts v $ plot_errbars_line_style .~ solidLine 1 (opaque black) - $ plot_errbars_tick_length .~ 2 + $ plot_errbars_tick_length .~ 7 $ def where mkErrPts = map (\(a,b,c) -> ErrPoint (ErrValue 0 0 0) (ErrValue a b c)) . concat -- ErrValue for x will be set after @@ -206,4 +209,3 @@ drawErrBar0 ps (ErrPoint (ErrValue _ x _) (ErrValue yl _ yh)) = do <> lineTo' (x+tl) yl <> moveTo' (x-tl) yh <> lineTo' (x+tl) yh - From acec4c3cb9a94353c5cd67443d74a645309d8dbf Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Mon, 6 Aug 2018 20:32:53 +0200 Subject: [PATCH 09/25] creation --- results/TIME-creation.md | 2306 +++++++++------ results/TIME-creation.svg | 5916 +++++++++++++++++++++++++++++++++++++ 2 files changed, 7397 insertions(+), 825 deletions(-) create mode 100644 results/TIME-creation.svg diff --git a/results/TIME-creation.md b/results/TIME-creation.md index 3705ee3..427a60e 100644 --- a/results/TIME-creation.md +++ b/results/TIME-creation.md @@ -1,38 +1,32 @@ -The content of this file was obtained with: -```Bash -$ time run -g '("Clique",4)' -g '("Mesh",4)' -g '("RealLife",4)' -d Html -b -``` - # Benchmarks Doing: ---- -* [edgeList](#edgelist) -* [vertexList](#vertexlist) -* [equality](#equality) -* [transpose](#transpose) +* [addEdge](#addedge) +* [addVertex](#addvertex) * [dff](#dff) -* [topSort](#topsort) -* [reachable](#reachable) -* [vertexCount](#vertexcount) * [edgeCount](#edgecount) +* [edgeList](#edgelist) +* [equality](#equality) * [hasEdge](#hasedge) -* [isEmpty](#isempty) * [hasVertex](#hasvertex) -* [addEdge](#addedge) -* [addVertex](#addvertex) -* [removeVertex](#removevertex) -* [removeEdge](#removeedge) +* [isEmpty](#isempty) * [mergeContext](#mergecontext) - +* [reachable](#reachable) +* [removeEdge](#removeedge) +* [removeVertex](#removevertex) +* [topSort](#topsort) +* [transpose](#transpose) +* [vertexCount](#vertexcount) +* [vertexList](#vertexlist) ---- Using [("Clique",4),("Mesh",4),("RealLife",4)] as graphs -## edgeList +## addEdge -Description: Produce a list of the edges in the graph +Description: Add an edge (not already in the graph) ### Clique @@ -57,16 +51,16 @@ Description: Produce a list of the edges in the graph Alga @@ -74,16 +68,16 @@ Description: Produce a list of the edges in the graph Containers @@ -91,16 +85,16 @@ Description: Produce a list of the edges in the graph Fgl @@ -108,16 +102,16 @@ Description: Produce a list of the edges in the graph Hash-Graph
- 51.86 ns + 72.12 ns - 42.86 μs + 2.758 μs - 9.489 ms + 304.4 μs - 1.345 s + 28.98 ms
- 42.18 ns + 88.16 ns - 1.774 μs + 1.297 μs - 207.9 μs + 121.4 μs - 72.91 ms + 81.01 ms
- 39.36 ns + 145.0 ns - 18.93 μs + 19.18 μs - 9.533 ms + 9.371 ms - 3.436 s + 3.411 s
- 40.19 ns + 197.2 ns - 21.98 μs + 22.71 μs - 7.785 ms + 7.616 ms - 3.975 s + 3.628 s
@@ -145,16 +139,16 @@ Description: Produce a list of the edges in the graph Alga - 52.01 ns + 77.02 ns - 11.62 μs + 821.0 ns - 222.0 μs + 10.91 μs - 4.745 ms + 113.0 μs @@ -162,16 +156,16 @@ Description: Produce a list of the edges in the graph Containers - 41.96 ns + 89.49 ns - 710.5 ns + 622.0 ns - 9.064 μs + 6.193 μs - 95.95 μs + 73.91 μs @@ -179,16 +173,16 @@ Description: Produce a list of the edges in the graph Fgl - 37.11 ns + 148.5 ns - 6.165 μs + 6.460 μs - 216.5 μs + 219.8 μs - 23.73 ms + 19.16 ms @@ -196,22 +190,22 @@ Description: Produce a list of the edges in the graph Hash-Graph - 42.36 ns + 197.0 ns - 5.970 μs + 7.134 μs - 203.9 μs + 221.1 μs - 19.92 ms + 19.94 ms ### RealLife - +^[[B^[[B
@@ -233,16 +227,16 @@ Description: Produce a list of the edges in the graph Alga @@ -250,16 +244,16 @@ Description: Produce a list of the edges in the graph Containers @@ -267,16 +261,16 @@ Description: Produce a list of the edges in the graph Fgl @@ -284,16 +278,16 @@ Description: Produce a list of the edges in the graph Hash-Graph
- 20.34 μs + 1.351 μs - 600.5 μs + 24.70 μs - 7.619 ms + 194.1 μs - 91.10 ms + 1.602 ms
- 1.025 μs + 834.0 ns - 17.98 μs + 13.31 μs - 158.7 μs + 113.8 μs - 3.092 ms + 1.348 ms
- 11.06 μs + 10.82 μs - 533.7 μs + 547.1 μs - 19.24 ms + 20.12 ms - 576.6 ms + 588.7 ms
- 10.96 μs + 12.29 μs - 518.7 μs + 546.2 μs - 18.84 ms + 18.51 ms - 598.4 ms + 575.9 ms
@@ -301,22 +295,20 @@ Description: Produce a list of the edges in the graph SUMMARY: - * Containers was the fastest 10 times - * Fgl was the fastest 1 times - - There was 1 ex-aequo + * Containers was the fastest 27 times + * Alga was the fastest 5 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 105.90 times faster than Hash-Graph - * Alga was 3.83 times faster than Hash-Graph - * Fgl was 1.08 times faster than Hash-Graph + * Alga was 151.21 times faster than Hash-Graph + * Containers was 105.65 times faster than Hash-Graph + * Fgl was 1.05 times faster than Hash-Graph -## vertexList +## addVertex -Description: Produce a list of the vertices in the graph +Description: Add a vertex (not already in the graph) ### Clique @@ -341,16 +333,16 @@ Description: Produce a list of the vertices in the graph Alga @@ -358,16 +350,16 @@ Description: Produce a list of the vertices in the graph Containers @@ -375,16 +367,16 @@ Description: Produce a list of the vertices in the graph Fgl @@ -392,16 +384,16 @@ Description: Produce a list of the vertices in the graph Hash-Graph
- 48.49 ns + 54.09 ns - 20.52 μs + 2.698 μs - 5.130 ms + 279.8 μs - 856.5 ms + 26.75 ms
- 35.52 ns + 107.4 ns - 960.3 ns + 1.421 μs - 105.1 μs + 124.0 μs - 81.59 ms + 88.73 ms
- 63.03 ns + 87.36 ns - 15.08 μs + 19.12 μs - 10.09 ms + 11.10 ms - 3.311 s + 3.396 s
- 27.74 ns + 116.2 ns - 19.85 μs + 22.55 μs - 10.36 ms + 7.917 ms - 3.804 s + 3.762 s
@@ -429,16 +421,16 @@ Description: Produce a list of the vertices in the graph Alga - 48.75 ns + 54.23 ns - 5.687 μs + 750.1 ns - 141.3 μs + 10.08 μs - 2.394 ms + 109.2 μs @@ -446,16 +438,16 @@ Description: Produce a list of the vertices in the graph Containers - 35.56 ns + 108.0 ns - 404.3 ns + 739.1 ns - 5.359 μs + 7.526 μs - 44.82 μs + 78.35 μs @@ -463,16 +455,16 @@ Description: Produce a list of the vertices in the graph Fgl - 75.73 ns + 91.16 ns - 5.686 μs + 6.194 μs - 202.3 μs + 225.1 μs - 18.27 ms + 20.05 ms @@ -480,16 +472,16 @@ Description: Produce a list of the vertices in the graph Hash-Graph - 31.99 ns + 113.3 ns - 5.249 μs + 6.880 μs - 196.2 μs + 230.3 μs - 21.46 ms + 21.06 ms @@ -517,16 +509,16 @@ Description: Produce a list of the vertices in the graph Alga - 9.681 μs + 1.253 μs - 287.1 μs + 23.21 μs - 3.387 ms + 182.2 μs - 40.55 ms + 1.503 ms @@ -534,16 +526,16 @@ Description: Produce a list of the vertices in the graph Containers - 560.3 ns + 1.023 μs - 9.040 μs + 14.46 μs - 77.43 μs + 121.2 μs - 992.7 μs + 1.445 ms @@ -551,16 +543,16 @@ Description: Produce a list of the vertices in the graph Fgl - 9.476 μs + 11.11 μs - 471.9 μs + 562.2 μs - 17.04 ms + 21.23 ms - 516.4 ms + 550.6 ms @@ -568,16 +560,16 @@ Description: Produce a list of the vertices in the graph Hash-Graph - 9.489 μs + 12.34 μs - 490.6 μs + 562.7 μs - 18.27 ms + 19.73 ms - 580.3 ms + 552.9 ms @@ -585,20 +577,22 @@ Description: Produce a list of the vertices in the graph SUMMARY: - * Containers was the fastest 10 times - * Hash-Graph was the fastest 2 times + * Containers was the fastest 14 times + * Alga was the fastest 6 times + + There was 4 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 118.84 times faster than Hash-Graph - * Alga was 5.48 times faster than Hash-Graph - * Fgl was 1.15 times faster than Hash-Graph + * Alga was 166.92 times faster than Hash-Graph + * Containers was 100.20 times faster than Hash-Graph + * Fgl was 1.09 times faster than Hash-Graph -## equality +## dff -Description: Test if two graphs are equals +Description: Produce a forest, obtained from a DFS (Deep First Search) of each vertex ### Clique @@ -623,16 +617,16 @@ Description: Test if two graphs are equals Alga @@ -640,16 +634,16 @@ Description: Test if two graphs are equals Containers @@ -657,16 +651,16 @@ Description: Test if two graphs are equals Fgl @@ -674,16 +668,16 @@ Description: Test if two graphs are equals Hash-Graph
- 194.6 ns + 609.6 ns - 63.87 μs + 30.67 μs - 13.65 ms + 6.614 ms - 1.947 s + 857.0 ms
- 33.27 ns + 139.5 ns - 1.059 μs + 3.219 μs - 122.3 μs + 343.5 μs - 89.36 ms + 101.0 ms
- 167.8 ns + 264.1 ns - 30.49 μs + 25.25 μs - 10.93 ms + 11.57 ms - 3.750 s + 3.682 s
- 70.81 ns + 78.39 ns - 24.83 μs + 25.85 μs - 8.072 ms + 9.004 ms - 3.674 s + 3.926 s
@@ -711,16 +705,16 @@ Description: Test if two graphs are equals Alga - 195.3 ns + 588.7 ns - 17.79 μs + 11.32 μs - 331.6 μs + 165.7 μs - 6.538 ms + 3.689 ms @@ -728,16 +722,16 @@ Description: Test if two graphs are equals Containers - 33.05 ns + 140.3 ns - 380.4 ns + 1.719 μs - 5.487 μs + 18.23 μs - 45.86 μs + 236.0 μs @@ -745,16 +739,16 @@ Description: Test if two graphs are equals Fgl - 167.0 ns + 259.9 ns - 10.79 μs + 11.20 μs - 265.4 μs + 292.3 μs - 18.96 ms + 19.66 ms @@ -762,16 +756,16 @@ Description: Test if two graphs are equals Hash-Graph - 71.23 ns + 73.14 ns - 6.916 μs + 8.289 μs - 221.6 μs + 252.1 μs - 18.85 ms + 20.14 ms @@ -799,16 +793,16 @@ Description: Test if two graphs are equals Alga - 29.44 μs + 17.29 μs - 844.2 μs + 400.3 μs - 11.97 ms + 5.837 ms - 139.5 ms + 77.33 ms @@ -816,16 +810,16 @@ Description: Test if two graphs are equals Containers - 545.6 ns + 2.568 μs - 10.60 μs + 32.21 μs - 93.95 μs + 287.0 μs - 1.158 ms + 7.036 ms @@ -833,16 +827,16 @@ Description: Test if two graphs are equals Fgl - 17.28 μs + 19.11 μs - 618.2 μs + 690.8 μs - 20.38 ms + 21.40 ms - 556.7 ms + 575.6 ms @@ -850,16 +844,16 @@ Description: Test if two graphs are equals Hash-Graph - 12.08 μs + 15.11 μs - 541.6 μs + 586.0 μs - 17.54 ms + 17.44 ms - 556.1 ms + 540.3 ms @@ -867,21 +861,20 @@ Description: Test if two graphs are equals SUMMARY: - * Containers was the fastest 22 times - - There was 2 ex-aequo + * Containers was the fastest 10 times + * Hash-Graph was the fastest 2 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 104.51 times faster than Fgl - * Alga was 2.28 times faster than Fgl - * Hash-Graph was 1.00 times faster than Fgl + * Containers was 59.45 times faster than Hash-Graph + * Alga was 5.41 times faster than Hash-Graph + * Fgl was 1.02 times faster than Hash-Graph -## transpose +## edgeCount -Description: Transpose (invert all the edges) the graph +Description: Count the edges of the graph ### Clique @@ -906,16 +899,16 @@ Description: Transpose (invert all the edges) the graph Alga @@ -923,16 +916,50 @@ Description: Transpose (invert all the edges) the graph Containers + + + + + + + + + + + + + +
- 28.75 ns + 51.68 ns - 5.666 μs + 17.68 μs - 588.6 μs + 3.405 ms - 64.89 ms + 538.9 ms
- 92.80 ns + 41.59 ns - 2.969 μs + 1.066 μs - 497.0 μs + 107.9 μs + + 70.83 ms +
+ Fgl + + 50.25 ns + + 18.05 μs + + 10.05 ms + + 3.346 s +
+ Hash-Graph + + 55.24 ns + + 20.05 μs + + 7.648 ms - 141.7 ms + 3.620 s
@@ -960,16 +987,16 @@ Description: Transpose (invert all the edges) the graph Alga - 29.42 ns + 51.02 ns - 1.670 μs + 4.832 μs - 21.25 μs + 84.94 μs - 229.7 μs + 1.463 ms @@ -977,16 +1004,50 @@ Description: Transpose (invert all the edges) the graph Containers - 100.2 ns + 40.77 ns + + + 382.1 ns + + + 5.082 μs + + + 53.40 μs + + + + + Fgl + + + 44.22 ns + + + 5.848 μs + + + 203.3 μs + + + 18.84 ms + + + + + Hash-Graph + + + 52.64 ns - 1.199 μs + 5.934 μs - 14.50 μs + 199.1 μs - 197.1 μs + 19.76 ms @@ -1014,16 +1075,16 @@ Description: Transpose (invert all the edges) the graph Alga - 2.718 μs + 8.552 μs - 49.05 μs + 253.0 μs - 382.2 μs + 3.285 ms - 3.210 ms + 48.20 ms @@ -1031,16 +1092,50 @@ Description: Transpose (invert all the edges) the graph Containers - 1.730 μs + 603.0 ns + + + 10.81 μs + + + 100.8 μs + + + 1.174 ms + + + + + Fgl + + + 10.32 μs + + + 503.5 μs + + + 18.87 ms + + + 555.9 ms + + + + + Hash-Graph + + + 10.47 μs - 30.11 μs + 496.4 μs - 313.8 μs + 17.56 ms - 7.580 ms + 574.3 ms @@ -1048,18 +1143,21 @@ Description: Transpose (invert all the edges) the graph SUMMARY: - * Containers was the fastest 8 times - * Alga was the fastest 4 times + * Containers was the fastest 11 times + + There was 1 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 1.80 times faster than Containers + * Containers was 123.40 times faster than Hash-Graph + * Alga was 7.91 times faster than Hash-Graph + * Fgl was 1.07 times faster than Hash-Graph -## dff +## edgeList -Description: Produce a forest, obtained from a DFS (Deep First Search) of each vertex +Description: Produce a list of the edges in the graph ### Clique @@ -1079,21 +1177,38 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v 1000 + + + + + + + @@ -1101,16 +1216,16 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v Fgl @@ -1118,16 +1233,16 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v Hash-Graph
+ Alga + + 45.02 ns + + 17.64 μs + + 3.384 ms + + 480.9 ms +
Containers - 157.5 ns + 53.74 ns - 3.417 μs + 1.660 μs - 341.3 μs + 219.5 μs - 89.81 ms + 73.73 ms
- 227.0 ns + 42.50 ns - 24.58 μs + 18.80 μs - 11.87 ms + 9.586 ms - 3.750 s + 3.290 s
- 67.98 ns + 45.45 ns - 26.08 μs + 20.37 μs - 7.971 ms + 7.762 ms - 4.195 s + 3.738 s
@@ -1150,21 +1265,38 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v 1000 + + + Alga + + + 45.04 ns + + + 4.836 μs + + + 85.89 μs + + + 1.412 ms + + Containers - 159.4 ns + 55.53 ns - 1.764 μs + 643.0 ns - 19.81 μs + 8.628 μs - 253.4 μs + 88.20 μs @@ -1172,16 +1304,16 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v Fgl - 229.3 ns + 42.61 ns - 11.36 μs + 6.108 μs - 303.7 μs + 209.2 μs - 19.77 ms + 19.97 ms @@ -1189,16 +1321,16 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v Hash-Graph - 68.49 ns + 45.29 ns - 8.093 μs + 5.794 μs - 244.8 μs + 200.7 μs - 20.44 ms + 20.17 ms @@ -1221,21 +1353,38 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v 3 + + + Alga + + + 8.370 μs + + + 253.3 μs + + + 3.420 ms + + + 49.36 ms + + Containers - 2.613 μs + 983.6 ns - 32.19 μs + 16.28 μs - 312.1 μs + 148.8 μs - 8.453 ms + 3.095 ms @@ -1243,16 +1392,16 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v Fgl - 18.88 μs + 10.71 μs - 688.4 μs + 512.2 μs - 22.33 ms + 19.25 ms - 582.4 ms + 621.4 ms @@ -1260,16 +1409,16 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v Hash-Graph - 14.11 μs + 10.48 μs - 568.1 μs + 504.2 μs - 17.45 ms + 18.31 ms - 554.7 ms + 563.5 ms @@ -1278,20 +1427,22 @@ Description: Produce a forest, obtained from a DFS (Deep First Search) of each v SUMMARY: * Containers was the fastest 10 times - * Hash-Graph was the fastest 2 times + + There was 2 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 61.17 times faster than Hash-Graph - * Fgl was 1.05 times faster than Hash-Graph + * Containers was 101.38 times faster than Hash-Graph + * Alga was 9.41 times faster than Hash-Graph + * Fgl was 1.08 times faster than Hash-Graph -## topSort +## equality -Description: Topological sorting of the vertices +Description: Test if two graphs are equals -### Mesh +### Clique + + + + + + + @@ -1331,16 +1499,16 @@ Description: Topological sorting of the vertices Fgl @@ -1348,21 +1516,21 @@ Description: Topological sorting of the vertices Hash-Graph
@@ -1309,21 +1460,38 @@ Description: Topological sorting of the vertices 1000
+ Alga + + 151.8 ns + + 24.86 μs + + 4.723 ms + + 694.8 ms +
Containers - 141.5 ns + 41.51 ns - 1.807 μs + 1.081 μs - 19.53 μs + 113.7 μs - 254.5 μs + 80.74 ms
- 359.7 ns + 181.9 ns - 14.27 μs + 29.28 μs - 339.8 μs + 11.70 ms - 22.77 ms + 3.576 s
- 209.2 ns + 79.85 ns - 11.43 μs + 22.66 μs - 278.7 μs + 7.920 ms - 19.63 ms + 3.518 s
-### Clique +### Mesh + + + + + + + @@ -1402,16 +1587,16 @@ Description: Topological sorting of the vertices Fgl @@ -1419,16 +1604,16 @@ Description: Topological sorting of the vertices Hash-Graph
@@ -1380,21 +1548,38 @@ Description: Topological sorting of the vertices 1000
+ Alga + + 153.2 ns + + 7.037 μs + + 122.6 μs + + 2.152 ms +
Containers - 143.9 ns + 40.31 ns - 3.579 μs + 364.6 ns - 364.7 μs + 4.846 μs - 100.6 ms + 46.58 μs
- 361.9 ns + 181.9 ns - 27.78 μs + 10.59 μs - 10.49 ms + 265.8 μs - 3.615 s + 19.00 ms
- 208.2 ns + 79.41 ns - 26.53 μs + 7.013 μs - 7.743 ms + 219.6 μs - 3.486 s + 18.48 ms
@@ -1451,21 +1636,38 @@ Description: Topological sorting of the vertices 3 + + + Alga + + + 11.50 μs + + + 358.3 μs + + + 4.712 ms + + + 68.09 ms + + Containers - 2.751 μs + 549.0 ns - 32.74 μs + 10.69 μs - 284.4 μs + 95.32 μs - 6.213 ms + 1.155 ms @@ -1473,16 +1675,16 @@ Description: Topological sorting of the vertices Fgl - 23.22 μs + 17.08 μs - 753.4 μs + 616.9 μs - 22.99 ms + 20.47 ms - 611.3 ms + 547.5 ms @@ -1490,16 +1692,16 @@ Description: Topological sorting of the vertices Hash-Graph - 19.17 μs + 12.09 μs - 525.1 μs + 546.8 μs - 17.83 ms + 17.42 ms - 557.1 ms + 542.7 ms @@ -1507,19 +1709,21 @@ Description: Topological sorting of the vertices SUMMARY: - * Containers was the fastest 12 times + * Containers was the fastest 22 times + + There was 2 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 61.01 times faster than Fgl - * Hash-Graph was 1.08 times faster than Fgl + * Containers was 111.91 times faster than Fgl + * Alga was 5.96 times faster than Fgl + * Hash-Graph was 1.03 times faster than Fgl +## hasEdge -## reachable - -Description: Produce a list of reachable vertices from a given one +Description: Test if the given edge is in the graph (with arguments both in the graph and not in the graph (where applicable)) ### Clique @@ -1539,21 +1743,38 @@ Description: Produce a list of reachable vertices from a given one 1000 + + + + + + + @@ -1561,16 +1782,33 @@ Description: Produce a list of reachable vertices from a given one Fgl + + + + + + +
+ Alga + + 50.19 ns + + 3.352 μs + + 498.1 μs + + 183.0 ms +
Containers - 128.4 ns + 38.11 ns - 1.941 μs + 858.1 ns - 216.8 μs + 90.20 μs - 79.34 ms + 75.03 ms
- 271.2 ns + 132.1 ns - 21.96 μs + 18.19 μs - 8.321 ms + 8.164 ms - 3.304 s + 3.329 s +
+ Hash-Graph + + 113.9 ns + + 18.74 μs + + 7.322 ms + + 3.655 s
@@ -1593,21 +1831,38 @@ Description: Produce a list of reachable vertices from a given one 1000 + + + Alga + + + 51.27 ns + + + 978.7 ns + + + 11.62 μs + + + 152.1 μs + + Containers - 125.1 ns + 38.75 ns - 882.6 ns + 293.8 ns - 9.750 μs + 3.655 μs - 109.5 μs + 40.63 μs @@ -1615,16 +1870,33 @@ Description: Produce a list of reachable vertices from a given one Fgl - 277.6 ns + 125.0 ns + + + 5.509 μs + + + 198.3 μs + + + 19.07 ms + + + + + Hash-Graph + + + 118.6 ns - 8.911 μs + 5.333 μs - 240.8 μs + 198.2 μs - 19.31 ms + 19.37 ms @@ -1647,21 +1919,38 @@ Description: Produce a list of reachable vertices from a given one 3 + + + Alga + + + 1.473 μs + + + 25.91 μs + + + 282.2 μs + + + 6.916 ms + + Containers - 1.270 μs + 416.8 ns - 26.51 μs + 7.998 μs - 160.7 μs + 75.12 μs - 2.907 ms + 944.5 μs @@ -1669,34 +1958,48 @@ Description: Produce a list of reachable vertices from a given one Fgl - 14.52 μs + 9.339 μs + + + 469.4 μs + + + 16.96 ms + + + 543.2 ms + + + + + Hash-Graph + + + 9.781 μs - 677.0 μs + 505.0 μs - 19.47 ms + 18.33 ms - 581.3 ms + 605.3 ms -SUMMARY: - - * Containers was the fastest 22 times - - ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 87.99 times faster than Fgl + * Containers was 124.08 times faster than Hash-Graph + * Alga was 33.68 times faster than Hash-Graph + * Fgl was 1.09 times faster than Hash-Graph -## edgeCount +## hasVertex -Description: Count the edges of the graph +Description: Test if the given vertex is in the graph ### Clique @@ -1721,16 +2024,16 @@ Description: Count the edges of the graph Alga @@ -1738,16 +2041,16 @@ Description: Count the edges of the graph Containers @@ -1755,16 +2058,16 @@ Description: Count the edges of the graph Fgl @@ -1772,16 +2075,16 @@ Description: Count the edges of the graph Hash-Graph
- 58.76 ns + 36.20 ns - 42.95 μs + 873.1 ns - 9.209 ms + 59.47 μs - 1.298 s + 6.111 ms
- 32.66 ns + 33.60 ns - 1.066 μs + 773.0 ns - 104.8 μs + 88.78 μs - 80.94 ms + 70.13 ms
- 37.68 ns + 56.77 ns - 17.73 μs + 15.93 μs - 9.106 ms + 7.607 ms - 3.357 s + 3.185 s
- 40.56 ns + 37.21 ns - 20.79 μs + 18.46 μs - 7.612 ms + 7.435 ms - 3.634 s + 3.593 s
@@ -1809,16 +2112,16 @@ Description: Count the edges of the graph Alga - 57.94 ns + 35.60 ns - 11.51 μs + 411.6 ns - 220.5 μs + 4.024 μs - 3.924 ms + 45.45 μs @@ -1826,16 +2129,16 @@ Description: Count the edges of the graph Containers - 32.68 ns + 32.97 ns - 407.3 ns + 265.2 ns - 5.049 μs + 3.583 μs - 46.84 μs + 43.27 μs @@ -1843,16 +2146,16 @@ Description: Count the edges of the graph Fgl - 39.78 ns + 56.24 ns - 6.008 μs + 4.953 μs - 213.6 μs + 197.9 μs - 18.61 ms + 18.94 ms @@ -1860,16 +2163,16 @@ Description: Count the edges of the graph Hash-Graph - 42.04 ns + 40.41 ns - 6.019 μs + 4.965 μs - 208.9 μs + 191.7 μs - 19.14 ms + 20.55 ms @@ -1897,16 +2200,16 @@ Description: Count the edges of the graph Alga - 19.86 μs + 498.7 ns - 580.0 μs + 5.539 μs - 6.794 ms + 69.34 μs - 94.76 ms + 360.9 μs @@ -1914,16 +2217,16 @@ Description: Count the edges of the graph Containers - 585.3 ns + 391.7 ns - 10.80 μs + 8.053 μs - 99.63 μs + 74.56 μs - 1.156 ms + 919.0 μs @@ -1931,16 +2234,16 @@ Description: Count the edges of the graph Fgl - 10.22 μs + 8.748 μs - 513.6 μs + 470.6 μs - 19.26 ms + 16.71 ms - 587.0 ms + 545.8 ms @@ -1948,16 +2251,16 @@ Description: Count the edges of the graph Hash-Graph - 10.16 μs + 9.533 μs - 494.3 μs + 490.6 μs - 17.77 ms + 18.42 ms - 541.0 ms + 617.3 ms @@ -1965,19 +2268,22 @@ Description: Count the edges of the graph SUMMARY: - * Containers was the fastest 12 times + * Alga was the fastest 23 times + * Containers was the fastest 13 times + + There was 8 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 111.69 times faster than Hash-Graph - * Alga was 3.22 times faster than Hash-Graph - * Fgl was 1.06 times faster than Hash-Graph + * Alga was 4251209.16 times faster than Hash-Graph + * Containers was 129.61 times faster than Hash-Graph + * Fgl was 1.14 times faster than Hash-Graph -## hasEdge +## isEmpty -Description: Test if the given edge is in the graph (with arguments both in the graph and not in the graph (where applicable)) +Description: Test if the graph is empty ### Clique @@ -2002,16 +2308,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Alga @@ -2019,16 +2325,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Containers @@ -2036,16 +2342,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Fgl @@ -2053,16 +2359,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Hash-Graph
- 696.7 ns + 34.26 ns - 12.76 μs + 55.78 ns - 1.077 ms + 55.83 ns - 274.3 ms + 56.21 ns
- 30.63 ns + 31.80 ns - 900.9 ns + 784.5 ns - 87.69 μs + 86.15 μs - 74.16 ms + 62.05 ms
- 120.8 ns + 31.41 ns - 18.16 μs + 12.20 μs - 8.749 ms + 5.090 ms - 3.322 s + 2.598 s
- 107.1 ns + 30.53 ns - 19.69 μs + 19.01 μs - 7.439 ms + 7.358 ms - 3.587 s + 3.660 s
@@ -2090,16 +2396,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Alga - 718.7 ns + 31.98 ns - 4.997 μs + 57.75 ns - 39.47 μs + 55.91 ns - 420.6 μs + 56.82 ns @@ -2107,16 +2413,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Containers - 31.28 ns + 31.21 ns - 321.9 ns + 270.0 ns - 3.696 μs + 4.104 μs - 44.70 μs + 34.66 μs @@ -2124,16 +2430,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Fgl - 121.6 ns + 30.86 ns - 5.550 μs + 4.444 μs - 194.1 μs + 191.6 μs - 18.14 ms + 18.52 ms @@ -2141,16 +2447,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Hash-Graph - 108.3 ns + 30.57 ns - 5.288 μs + 4.856 μs - 194.5 μs + 193.3 μs - 19.43 ms + 19.90 ms @@ -2178,16 +2484,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Alga - 6.451 μs + 56.68 ns - 87.08 μs + 55.96 ns - 683.4 μs + 56.59 ns - 11.32 ms + 55.72 ns @@ -2195,16 +2501,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Containers - 412.2 ns + 389.7 ns - 7.962 μs + 7.943 μs - 72.64 μs + 76.00 μs - 892.6 μs + 921.1 μs @@ -2212,16 +2518,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Fgl - 9.231 μs + 7.775 μs - 452.4 μs + 442.9 μs - 16.12 ms + 16.03 ms - 519.9 ms + 591.9 ms @@ -2229,16 +2535,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Hash-Graph - 9.639 μs + 9.349 μs - 488.2 μs + 490.5 μs - 19.32 ms + 18.49 ms - 539.9 ms + 547.6 ms @@ -2246,19 +2552,21 @@ Description: Test if the given edge is in the graph (with arguments both in the SUMMARY: - * Containers was the fastest 62 times + * Alga was the fastest 10 times + + There was 2 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 121.86 times faster than Hash-Graph - * Alga was 18.50 times faster than Hash-Graph - * Fgl was 1.08 times faster than Hash-Graph + * Alga was 55016533.69 times faster than Hash-Graph + * Containers was 147.25 times faster than Hash-Graph + * Fgl was 1.34 times faster than Hash-Graph -## isEmpty +## mergeContext -Description: Test if the graph is empty +Description: Merge a FGL context in the graph ### Clique @@ -2278,38 +2586,21 @@ Description: Test if the graph is empty 1000 - - - - - - - @@ -2317,16 +2608,16 @@ Description: Test if the graph is empty Hash-Graph
- Alga - - 23.62 ns - - 73.74 ns - - 75.52 ns - - 79.23 ns -
Fgl - 22.74 ns + 127.3 ns - 12.26 μs + 19.65 μs - 5.544 ms + 10.84 ms - 2.652 s + 3.644 s
- 22.38 ns + 134.2 ns - 19.48 μs + 22.35 μs - 8.421 ms + 8.275 ms - 3.602 s + 3.637 s
@@ -2349,38 +2640,21 @@ Description: Test if the graph is empty 1000 - - - Alga - - - 23.59 ns - - - 78.80 ns - - - 75.80 ns - - - 81.41 ns - - Fgl - 22.47 ns + 122.1 ns - 4.567 μs + 6.470 μs - 190.5 μs + 212.2 μs - 18.15 ms + 18.58 ms @@ -2388,16 +2662,16 @@ Description: Test if the graph is empty Hash-Graph - 21.74 ns + 135.7 ns - 5.020 μs + 6.823 μs - 195.1 μs + 224.1 μs - 18.58 ms + 18.64 ms @@ -2420,38 +2694,21 @@ Description: Test if the graph is empty 3 - - - Alga - - - 77.95 ns - - - 83.41 ns - - - 75.01 ns - - - 75.08 ns - - Fgl - 7.962 μs + 11.14 μs - 442.6 μs + 524.2 μs - 15.81 ms + 20.36 ms - 528.3 ms + 552.4 ms @@ -2459,37 +2716,39 @@ Description: Test if the graph is empty Hash-Graph - 9.400 μs + 12.21 μs - 490.3 μs + 549.4 μs - 17.49 ms + 20.71 ms - 544.4 ms + 551.1 ms +Not implemented for Containers because it is a nonsense. +Not implemented for Alga because it is a nonsense. SUMMARY: - * Alga was the fastest 10 times + * Fgl was the fastest 9 times + * Hash-Graph was the fastest 4 times - There was 2 ex-aequo + There was 23 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 660643.95 times faster than Hash-Graph - * Fgl was 1.03 times faster than Hash-Graph + * Hash-Graph was 1.00 times faster than Fgl -## vertexCount +## reachable -Description: Count the vertices of the graph +Description: Produce a list of reachable vertices from a given one ### Clique @@ -2514,16 +2773,33 @@ Description: Count the vertices of the graph Alga + + + + + + + @@ -2531,16 +2807,16 @@ Description: Count the vertices of the graph Fgl @@ -2548,16 +2824,16 @@ Description: Count the vertices of the graph Hash-Graph
- 35.49 ns + 802.7 ns + + 24.79 μs + + 5.076 ms + + 725.8 ms +
+ Containers + + 141.9 ns - 19.73 μs + 1.910 μs - 4.777 ms + 220.0 μs - 859.9 ms + 77.65 ms
- 26.27 ns + 335.5 ns - 12.50 μs + 22.21 μs - 4.693 ms + 10.38 ms - 2.799 s + 3.528 s
- 27.14 ns + 76.86 ns - 19.88 μs + 21.64 μs - 7.467 ms + 7.713 ms - 4.050 s + 3.736 s
@@ -2585,16 +2861,33 @@ Description: Count the vertices of the graph Alga - 34.27 ns + 795.0 ns + + + 9.343 μs + + + 131.2 μs + + + 2.945 ms + + + + + Containers + + + 140.5 ns - 5.608 μs + 875.0 ns - 131.4 μs + 8.857 μs - 2.274 ms + 106.2 μs @@ -2602,16 +2895,16 @@ Description: Count the vertices of the graph Fgl - 25.93 ns + 338.8 ns - 4.522 μs + 9.245 μs - 186.6 μs + 246.0 μs - 17.95 ms + 19.03 ms @@ -2619,16 +2912,16 @@ Description: Count the vertices of the graph Hash-Graph - 26.91 ns + 75.63 ns - 5.132 μs + 6.666 μs - 190.7 μs + 217.7 μs - 18.21 ms + 19.42 ms @@ -2656,16 +2949,33 @@ Description: Count the vertices of the graph Alga - 9.614 μs + 14.42 μs + + + 384.6 μs + + + 4.939 ms + + + 61.30 ms + + + + + Containers + + + 1.258 μs - 301.3 μs + 26.84 μs - 3.361 ms + 165.2 μs - 47.35 ms + 2.962 ms @@ -2673,16 +2983,16 @@ Description: Count the vertices of the graph Fgl - 8.147 μs + 15.13 μs - 446.2 μs + 709.4 μs - 16.35 ms + 19.55 ms - 526.1 ms + 558.9 ms @@ -2690,16 +3000,16 @@ Description: Count the vertices of the graph Hash-Graph - 10.79 μs + 11.99 μs - 498.1 μs + 574.3 μs 17.80 ms - 548.2 ms + 554.6 ms @@ -2707,30 +3017,26 @@ Description: Count the vertices of the graph SUMMARY: - * Alga was the fastest 6 times - * Fgl was the fastest 3 times - - There was 3 ex-aequo + * Containers was the fastest 20 times + * Hash-Graph was the fastest 2 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 7.08 times faster than Hash-Graph - * Fgl was 1.24 times faster than Hash-Graph + * Containers was 96.05 times faster than Hash-Graph + * Alga was 6.00 times faster than Hash-Graph + * Fgl was 1.03 times faster than Hash-Graph -## hasVertex +## removeEdge -Description: Test if the given vertex is in the graph +Description: Remove an edge of the graph ### Clique - @@ -2746,16 +3052,27 @@ Description: Test if the given vertex is in the graph Alga + + + + + @@ -2763,16 +3080,13 @@ Description: Test if the given vertex is in the graph Fgl - @@ -2780,16 +3094,13 @@ Description: Test if the given vertex is in the graph Hash-Graph -
- 1 - 10 - 36.44 ns + 18.29 μs + + 8.461 ms + + 1.277 s
+ Containers + - 1.319 μs + 1.457 μs - 116.2 μs + 116.7 μs - 12.50 ms + 91.23 ms
- 62.42 ns + 22.23 μs - 16.39 μs - - 8.972 ms + 9.930 ms - 3.250 s + 3.568 s
- 28.02 ns - - 19.60 μs + 22.35 μs - 8.924 ms + 7.810 ms - 3.471 s + 3.690 s
@@ -2799,9 +3110,6 @@ Description: Test if the given vertex is in the graph - - 1 - 10 @@ -2817,16 +3125,27 @@ Description: Test if the given vertex is in the graph Alga - 34.33 ns + 6.099 μs + + + 85.10 μs + + + 2.551 ms + + + + Containers + - 615.8 ns + 674.7 ns - 7.875 μs + 6.438 μs - 88.56 μs + 65.30 μs @@ -2834,16 +3153,13 @@ Description: Test if the given vertex is in the graph Fgl - 55.02 ns + 7.715 μs - 4.956 μs - - - 190.6 μs + 224.4 μs - 17.96 ms + 19.56 ms @@ -2851,16 +3167,13 @@ Description: Test if the given vertex is in the graph Hash-Graph - 28.11 ns - - - 5.023 μs + 7.165 μs - 194.1 μs + 224.9 μs - 18.52 ms + 20.05 ms @@ -2888,72 +3201,82 @@ Description: Test if the given vertex is in the graph Alga - 944.1 ns + 9.047 μs - 13.35 μs + 199.9 μs - 144.6 μs + 5.780 ms - 700.6 μs + 56.08 ms - Fgl + Containers - 8.636 μs + 880.0 ns - 452.4 μs + 13.73 μs - 15.79 ms + 115.5 μs - 523.3 ms + 1.364 ms - Hash-Graph + Fgl - 9.210 μs + 12.17 μs - 489.9 μs + 566.8 μs - 17.33 ms + 20.31 ms - 544.2 ms + 561.1 ms - - - -SUMMARY: - - * Alga was the fastest 40 times - * Hash-Graph was the fastest 2 times - - There was 2 ex-aequo + + + Hash-Graph + + + 12.17 μs + + + 553.2 μs + + + 18.94 ms + + + 580.0 ms + + + ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 304.69 times faster than Hash-Graph - * Fgl was 1.10 times faster than Hash-Graph + * Containers was 98.90 times faster than Hash-Graph + * Alga was 4.01 times faster than Hash-Graph + * Fgl was 1.03 times faster than Hash-Graph -## addEdge +## removeVertex -Description: Add an edge (not already in the graph) +Description: Remove a vertex of the graph ### Clique @@ -2978,16 +3301,33 @@ Description: Add an edge (not already in the graph) Alga + + + + + + + @@ -2995,16 +3335,16 @@ Description: Add an edge (not already in the graph) Fgl @@ -3012,16 +3352,16 @@ Description: Add an edge (not already in the graph) Hash-Graph
- 50.69 ns + 41.81 ns - 3.691 μs + 5.458 μs - 400.5 μs + 874.1 μs - 44.97 ms + 261.2 ms +
+ Containers + + 45.88 ns + + 1.536 μs + + 119.4 μs + + 75.03 ms
- 123.1 ns + 95.03 ns - 19.97 μs + 19.82 μs - 10.34 ms + 10.55 ms - 3.573 s + 3.434 s
- 172.3 ns + 89.83 ns - 25.47 μs + 25.59 μs - 8.626 ms + 7.803 ms - 3.797 s + 3.658 s
@@ -3049,16 +3389,33 @@ Description: Add an edge (not already in the graph) Alga - 49.85 ns + 42.15 ns + + + 1.570 μs + + + 21.49 μs + + + 267.3 μs + + + + + Containers + + + 45.51 ns - 1.130 μs + 857.1 ns - 14.60 μs + 10.82 μs - 160.3 μs + 119.7 μs @@ -3066,16 +3423,16 @@ Description: Add an edge (not already in the graph) Fgl - 121.9 ns + 95.39 ns - 6.304 μs + 6.573 μs - 208.7 μs + 210.3 μs - 19.07 ms + 19.54 ms @@ -3083,16 +3440,16 @@ Description: Add an edge (not already in the graph) Hash-Graph - 171.7 ns + 92.46 ns - 7.468 μs + 8.124 μs - 219.1 μs + 224.1 μs - 19.15 ms + 20.75 ms @@ -3120,16 +3477,33 @@ Description: Add an edge (not already in the graph) Alga - 1.779 μs + 2.366 μs - 34.26 μs + 45.80 μs - 271.9 μs + 491.3 μs - 2.105 ms + 10.39 ms + + + + + Containers + + + 1.317 μs + + + 17.24 μs + + + 134.8 μs + + + 1.675 ms @@ -3137,16 +3511,16 @@ Description: Add an edge (not already in the graph) Fgl - 10.70 μs + 11.47 μs - 522.0 μs + 531.2 μs - 20.16 ms + 19.03 ms - 582.8 ms + 559.3 ms @@ -3154,16 +3528,16 @@ Description: Add an edge (not already in the graph) Hash-Graph - 12.79 μs + 13.54 μs - 525.2 μs + 562.8 μs - 19.01 ms + 18.92 ms - 579.8 ms + 550.1 ms @@ -3171,18 +3545,21 @@ Description: Add an edge (not already in the graph) SUMMARY: - * Alga was the fastest 42 times + * Containers was the fastest 28 times + + There was 2 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 125.75 times faster than Hash-Graph - * Fgl was 1.03 times faster than Hash-Graph + * Containers was 102.29 times faster than Hash-Graph + * Alga was 30.57 times faster than Hash-Graph + * Fgl was 1.06 times faster than Hash-Graph -## addVertex +## topSort -Description: Add a vertex (not already in the graph) +Description: Topological sorting of the vertices ### Clique @@ -3207,16 +3584,33 @@ Description: Add a vertex (not already in the graph) Alga + + + + + + + @@ -3224,16 +3618,16 @@ Description: Add a vertex (not already in the graph) Fgl @@ -3241,16 +3635,16 @@ Description: Add a vertex (not already in the graph) Hash-Graph
- 38.54 ns + 630.1 ns - 3.666 μs + 30.49 μs - 391.3 μs + 6.274 ms - 40.42 ms + 991.2 ms +
+ Containers + + 173.2 ns + + 3.374 μs + + 349.6 μs + + 105.0 ms
- 77.54 ns + 463.3 ns - 18.82 μs + 28.19 μs - 12.60 ms + 10.52 ms - 3.536 s + 3.697 s
- 108.0 ns + 199.4 ns - 24.70 μs + 28.38 μs - 8.503 ms + 7.769 ms - 3.511 s + 3.697 s
@@ -3278,16 +3672,33 @@ Description: Add a vertex (not already in the graph) Alga - 39.23 ns + 625.9 ns - 1.137 μs + 12.33 μs - 14.87 μs + 185.2 μs - 157.9 μs + 4.149 ms + + + + + Containers + + + 169.7 ns + + + 1.882 μs + + + 19.86 μs + + + 251.2 μs @@ -3295,16 +3706,16 @@ Description: Add a vertex (not already in the graph) Fgl - 77.19 ns + 460.0 ns - 6.036 μs + 14.04 μs - 207.2 μs + 341.9 μs - 19.13 ms + 24.82 ms @@ -3312,16 +3723,16 @@ Description: Add a vertex (not already in the graph) Hash-Graph - 106.2 ns + 206.0 ns - 7.242 μs + 12.37 μs - 217.6 μs + 292.8 μs - 19.46 ms + 21.03 ms @@ -3349,16 +3760,33 @@ Description: Add a vertex (not already in the graph) Alga - 1.739 μs + 19.00 μs - 32.48 μs + 400.9 μs - 256.7 μs + 6.216 ms - 2.079 ms + 75.18 ms + + + + + Containers + + + 2.815 μs + + + 32.11 μs + + + 298.5 μs + + + 7.486 ms @@ -3366,16 +3794,16 @@ Description: Add a vertex (not already in the graph) Fgl - 10.84 μs + 22.97 μs - 524.4 μs + 793.7 μs - 19.86 ms + 26.17 ms - 599.5 ms + 653.8 ms @@ -3383,35 +3811,31 @@ Description: Add a vertex (not already in the graph) Hash-Graph - 12.60 μs + 19.88 μs - 536.7 μs + 531.0 μs - 18.78 ms + 17.87 ms - 556.0 ms + 595.1 ms -SUMMARY: - - * Alga was the fastest 24 times - - ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 129.50 times faster than Fgl - * Hash-Graph was 1.01 times faster than Fgl + * Containers was 60.03 times faster than Fgl + * Alga was 5.32 times faster than Fgl + * Hash-Graph was 1.06 times faster than Fgl -## removeVertex +## transpose -Description: Remove a vertex of the graph +Description: Transpose (invert all the edges) the graph ### Clique @@ -3436,16 +3860,33 @@ Description: Remove a vertex of the graph Alga + + + + + + + @@ -3453,16 +3894,16 @@ Description: Remove a vertex of the graph Fgl @@ -3470,16 +3911,16 @@ Description: Remove a vertex of the graph Hash-Graph
- 36.30 ns + 38.71 ns - 6.547 μs + 4.515 μs - 1.074 ms + 497.0 μs - 294.6 ms + 47.66 ms +
+ Containers + + 103.2 ns + + 2.952 μs + + 466.9 μs + + 142.4 ms
- 67.90 ns + 134.8 ns - 19.49 μs + 31.11 μs - 10.40 ms + 14.24 ms - 3.414 s + 3.891 s
- 74.52 ns + 69.94 ns - 28.04 μs + 33.25 μs - 8.298 ms + 12.24 ms - 3.668 s + 4.399 s
@@ -3507,16 +3948,33 @@ Description: Remove a vertex of the graph Alga - 35.98 ns + 38.34 ns + + + 1.334 μs + + + 18.05 μs + + + 196.8 μs + + + + + Containers + + + 101.7 ns - 1.875 μs + 1.249 μs - 26.71 μs + 13.71 μs - 335.1 μs + 185.2 μs @@ -3524,16 +3982,16 @@ Description: Remove a vertex of the graph Fgl - 66.92 ns + 132.3 ns - 6.304 μs + 10.21 μs - 209.2 μs + 264.1 μs - 19.34 ms + 21.44 ms @@ -3541,16 +3999,16 @@ Description: Remove a vertex of the graph Hash-Graph - 75.04 ns + 69.69 ns - 8.172 μs + 8.615 μs - 218.8 μs + 251.1 μs - 20.76 ms + 22.29 ms @@ -3578,16 +4036,33 @@ Description: Remove a vertex of the graph Alga - 2.992 μs + 2.137 μs + + + 40.26 μs + + + 321.6 μs + + + 2.601 ms + + + + + Containers + + + 1.759 μs - 59.31 μs + 30.62 μs - 600.4 μs + 313.4 μs - 13.27 ms + 6.828 ms @@ -3595,16 +4070,16 @@ Description: Remove a vertex of the graph Fgl - 10.91 μs + 17.61 μs - 525.3 μs + 649.6 μs - 19.57 ms + 24.12 ms - 545.7 ms + 714.2 ms @@ -3612,16 +4087,16 @@ Description: Remove a vertex of the graph Hash-Graph - 13.63 μs + 15.23 μs - 542.7 μs + 683.0 μs - 18.77 ms + 23.38 ms - 543.0 ms + 582.3 ms @@ -3629,24 +4104,31 @@ Description: Remove a vertex of the graph SUMMARY: - * Alga was the fastest 24 times + * Alga was the fastest 4 times + * Containers was the fastest 4 times + + There was 4 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 24.81 times faster than Hash-Graph - * Fgl was 1.06 times faster than Hash-Graph + * Alga was 125.06 times faster than Hash-Graph + * Containers was 57.24 times faster than Hash-Graph + * Fgl was 1.05 times faster than Hash-Graph -## removeEdge +## vertexCount -Description: Remove an edge of the graph +Description: Count the vertices of the graph ### Clique + @@ -3662,13 +4144,33 @@ Description: Remove an edge of the graph Alga + + + + + + + + @@ -3676,13 +4178,16 @@ Description: Remove an edge of the graph Fgl + @@ -3690,13 +4195,16 @@ Description: Remove an edge of the graph Hash-Graph +
+ 1 + 10 - 22.65 μs + 44.06 ns - 9.755 ms + 3.470 μs + + 800.4 μs - 1.204 s + 204.4 ms +
+ Containers + + 32.68 ns + + 996.0 ns + + 85.82 μs + + 84.43 ms
- 22.04 μs + 33.80 ns + + 12.86 μs - 10.61 ms + 4.997 ms - 3.490 s + 2.707 s
- 24.42 μs + 35.17 ns + + 18.57 μs - 8.459 ms + 7.493 ms - 3.648 s + 3.679 s
@@ -3706,6 +4214,9 @@ Description: Remove an edge of the graph + + 1 + 10 @@ -3721,13 +4232,33 @@ Description: Remove an edge of the graph Alga - 6.824 μs + 44.14 ns + + + 979.0 ns + + + 14.77 μs + + + 248.2 μs + + + + + Containers + + + 32.98 ns - 93.62 μs + 268.2 ns + + + 3.834 μs - 3.084 ms + 33.93 μs @@ -3735,13 +4266,16 @@ Description: Remove an edge of the graph Fgl - 7.195 μs + 33.80 ns - 210.8 μs + 4.561 μs + + + 191.8 μs - 18.12 ms + 18.48 ms @@ -3749,13 +4283,16 @@ Description: Remove an edge of the graph Hash-Graph - 7.007 μs + 35.03 ns - 216.7 μs + 5.149 μs + + + 192.5 μs - 18.61 ms + 18.53 ms @@ -3783,16 +4320,33 @@ Description: Remove an edge of the graph Alga - 10.73 μs + 1.582 μs - 222.6 μs + 41.72 μs - 5.626 ms + 701.1 μs - 61.31 ms + 11.45 ms + + + + + Containers + + + 391.6 ns + + + 7.954 μs + + + 74.28 μs + + + 929.1 μs @@ -3800,16 +4354,16 @@ Description: Remove an edge of the graph Fgl - 11.72 μs + 8.252 μs - 530.1 μs + 443.8 μs - 20.56 ms + 16.06 ms - 545.6 ms + 521.7 ms @@ -3817,16 +4371,16 @@ Description: Remove an edge of the graph Hash-Graph - 12.40 μs + 9.660 μs - 526.5 μs + 494.5 μs - 17.44 ms + 17.94 ms - 543.2 ms + 566.9 ms @@ -3834,21 +4388,21 @@ Description: Remove an edge of the graph SUMMARY: - * Alga was the fastest 20 times - * Hash-Graph was the fastest 2 times + * Containers was the fastest 10 times - There was 8 ex-aequo + There was 2 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 4.93 times faster than Hash-Graph - * Fgl was 1.03 times faster than Hash-Graph + * Containers was 113.55 times faster than Hash-Graph + * Alga was 23.88 times faster than Hash-Graph + * Fgl was 1.32 times faster than Hash-Graph -## mergeContext +## vertexList -Description: Merge a FGL context in the graph +Description: Produce a list of the vertices in the graph ### Clique @@ -3868,21 +4422,55 @@ Description: Merge a FGL context in the graph 1000 + + + + + + + + + + + + + + @@ -3890,16 +4478,16 @@ Description: Merge a FGL context in the graph Hash-Graph
+ Alga + + 52.50 ns + + 3.676 μs + + 743.7 μs + + 225.0 ms +
+ Containers + + 44.04 ns + + 907.4 ns + + 136.8 μs + + 75.21 ms +
Fgl - 112.0 ns + 60.56 ns - 18.50 μs + 15.03 μs - 11.18 ms + 6.064 ms - 3.502 s + 2.841 s
- 117.7 ns + 35.31 ns - 24.46 μs + 18.65 μs - 8.564 ms + 8.874 ms - 3.622 s + 3.599 s
@@ -3922,21 +4510,55 @@ Description: Merge a FGL context in the graph 1000 + + + Alga + + + 51.06 ns + + + 1.093 μs + + + 15.61 μs + + + 255.7 μs + + + + + Containers + + + 43.38 ns + + + 395.4 ns + + + 4.234 μs + + + 44.22 μs + + Fgl - 113.1 ns + 60.50 ns - 6.089 μs + 5.339 μs - 208.3 μs + 201.9 μs - 18.19 ms + 18.12 ms @@ -3944,16 +4566,16 @@ Description: Merge a FGL context in the graph Hash-Graph - 115.5 ns + 34.43 ns - 7.144 μs + 5.275 μs - 218.3 μs + 191.5 μs - 18.77 ms + 17.87 ms @@ -3976,21 +4598,55 @@ Description: Merge a FGL context in the graph 3 + + + Alga + + + 1.792 μs + + + 42.48 μs + + + 672.2 μs + + + 11.51 ms + + + + + Containers + + + 553.8 ns + + + 8.867 μs + + + 77.89 μs + + + 931.1 μs + + Fgl - 10.58 μs + 9.500 μs - 521.7 μs + 473.0 μs - 19.25 ms + 16.19 ms - 544.5 ms + 529.2 ms @@ -3998,16 +4654,16 @@ Description: Merge a FGL context in the graph Hash-Graph - 12.40 μs + 9.491 μs - 528.3 μs + 482.9 μs - 17.47 ms + 17.04 ms - 544.7 ms + 540.7 ms @@ -4015,14 +4671,14 @@ Description: Merge a FGL context in the graph SUMMARY: - * Fgl was the fastest 11 times - * Hash-Graph was the fastest 7 times - - There was 18 ex-aequo + * Containers was the fastest 10 times + * Hash-Graph was the fastest 2 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Fgl was 1.02 times faster than Hash-Graph + * Containers was 119.57 times faster than Hash-Graph + * Alga was 23.44 times faster than Hash-Graph + * Fgl was 1.22 times faster than Hash-Graph diff --git a/results/TIME-creation.svg b/results/TIME-creation.svg new file mode 100644 index 0000000..77f7cf2 --- /dev/null +++ b/results/TIME-creation.svg @@ -0,0 +1,5916 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 8137d550dbc667337edcbf71d7ed28f246c9cd82 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Tue, 7 Aug 2018 08:47:04 +0200 Subject: [PATCH 10/25] Add time extra --- results/TIME-extra.md | 1180 +++++++++--- results/TIME-extra.svg | 4004 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 4900 insertions(+), 284 deletions(-) create mode 100644 results/TIME-extra.svg diff --git a/results/TIME-extra.md b/results/TIME-extra.md index d39c122..af3883a 100644 --- a/results/TIME-extra.md +++ b/results/TIME-extra.md @@ -1,39 +1,33 @@ -The content of this fil was obtained with **modified** sources: `bench/Alga/Graph.hs` was modified, replacing: -```Haskell -instance GraphImpl (Graph Int) where - mkGraph = mk -``` -by - -```Haskell -instance GraphImpl (Graph Int) where - mkGraph = mkSpecClique -``` # Benchmarks Doing: ---- +* [addEdge](#addedge) +* [addVertex](#addvertex) +* [creation](#creation) +* [dff](#dff) +* [edgeCount](#edgecount) * [edgeList](#edgelist) -* [vertexList](#vertexlist) * [equality](#equality) -* [transpose](#transpose) -* [vertexCount](#vertexcount) -* [edgeCount](#edgecount) * [hasEdge](#hasedge) -* [isEmpty](#isempty) * [hasVertex](#hasvertex) -* [addEdge](#addedge) -* [addVertex](#addvertex) -* [removeVertex](#removevertex) +* [isEmpty](#isempty) +* [mergeContext](#mergecontext) +* [reachable](#reachable) * [removeEdge](#removeedge) +* [removeVertex](#removevertex) +* [topSort](#topsort) +* [transpose](#transpose) +* [vertexCount](#vertexcount) +* [vertexList](#vertexlist) ---- Using [("Clique",4)] as graphs -## edgeList +## addEdge -Description: Produce a list of the edges in the graph +Description: Add an edge (not already in the graph) ### Clique @@ -58,16 +52,16 @@ Description: Produce a list of the edges in the graph Alga @@ -75,16 +69,16 @@ Description: Produce a list of the edges in the graph Containers @@ -92,16 +86,16 @@ Description: Produce a list of the edges in the graph Fgl @@ -109,37 +103,31 @@ Description: Produce a list of the edges in the graph Hash-Graph
- 48.07 ns + 44.80 ns - 6.014 μs + 165.5 ns - 366.1 μs + 1.203 μs - 75.24 ms + 11.28 μs
- 39.07 ns + 76.18 ns - 954.1 ns + 548.7 ns - 80.78 μs + 38.71 μs - 25.39 ms + 23.49 ms
- 34.22 ns + 132.1 ns - 3.049 μs + 2.156 μs - 341.2 μs + 198.6 μs - 127.7 ms + 28.05 ms
- 38.09 ns + 165.8 ns - 1.910 μs + 3.959 μs - 311.4 μs + 379.4 μs - 220.5 ms + 39.55 ms
-SUMMARY: - - * Containers was the fastest 3 times - * Fgl was the fastest 1 times - - ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 8.69 times faster than Hash-Graph - * Alga was 2.93 times faster than Hash-Graph - * Fgl was 1.73 times faster than Hash-Graph + * Alga was 3506.42 times faster than Hash-Graph + * Containers was 1.68 times faster than Hash-Graph + * Fgl was 1.41 times faster than Hash-Graph -## vertexList +## addVertex -Description: Produce a list of the vertices in the graph +Description: Add a vertex (not already in the graph) ### Clique @@ -164,16 +152,16 @@ Description: Produce a list of the vertices in the graph Alga @@ -181,16 +169,16 @@ Description: Produce a list of the vertices in the graph Containers @@ -198,16 +186,16 @@ Description: Produce a list of the vertices in the graph Fgl @@ -215,37 +203,31 @@ Description: Produce a list of the vertices in the graph Hash-Graph
- 44.34 ns + 34.91 ns - 1.395 μs + 142.8 ns - 28.87 μs + 1.057 μs - 459.8 μs + 10.72 μs
- 33.08 ns + 94.81 ns - 148.9 ns + 637.2 ns - 1.127 μs + 39.74 μs - 10.73 μs + 24.49 ms
- 53.84 ns + 75.32 ns - 420.9 ns + 2.002 μs - 4.303 μs + 195.7 μs - 43.57 μs + 27.97 ms
- 24.32 ns + 98.69 ns - 197.4 ns + 3.936 μs - 2.258 μs + 375.1 μs - 25.37 μs + 41.25 ms
-SUMMARY: - - * Containers was the fastest 3 times - * Hash-Graph was the fastest 1 times - - ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 42.85 times faster than Alga - * Hash-Graph was 18.12 times faster than Alga - * Fgl was 10.55 times faster than Alga + * Alga was 3848.57 times faster than Hash-Graph + * Containers was 1.68 times faster than Hash-Graph + * Fgl was 1.47 times faster than Hash-Graph -## equality +## creation -Description: Test if two graphs are equals +Description: Create a graph from a list of edges ### Clique @@ -270,16 +252,16 @@ Description: Test if two graphs are equals Alga @@ -287,16 +269,16 @@ Description: Test if two graphs are equals Containers @@ -304,16 +286,16 @@ Description: Test if two graphs are equals Fgl @@ -321,16 +303,16 @@ Description: Test if two graphs are equals Hash-Graph
- 445.7 ns + 45.29 ns - 9.593 μs + 627.5 ns - 555.0 μs + 35.93 μs - 130.7 ms + 5.769 ms
- 30.52 ns + 51.65 ns - 270.3 ns + 1.212 μs - 23.96 μs + 116.3 μs - 10.98 ms + 83.19 ms
- 166.2 ns + 39.24 ns - 13.99 μs + 18.53 μs - 2.957 ms + 10.27 ms - 503.1 ms + 3.227 s
- 68.30 ns + 29.39 ns - 4.135 μs + 21.98 μs - 452.5 μs + 7.351 ms - 56.81 ms + 3.604 s
@@ -338,21 +320,20 @@ Description: Test if two graphs are equals SUMMARY: - * Containers was the fastest 7 times - - There was 1 ex-aequo + * Alga was the fastest 3 times + * Hash-Graph was the fastest 1 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 89.26 times faster than Fgl - * Hash-Graph was 15.71 times faster than Fgl - * Alga was 5.07 times faster than Fgl + * Alga was 624.77 times faster than Hash-Graph + * Containers was 43.33 times faster than Hash-Graph + * Fgl was 1.12 times faster than Hash-Graph -## transpose +## dff -Description: Transpose (invert all the edges) the graph +Description: Produce a forest, obtained from a DFS (Deep First Search) of each vertex ### Clique @@ -377,16 +358,16 @@ Description: Transpose (invert all the edges) the graph Alga @@ -394,16 +375,50 @@ Description: Transpose (invert all the edges) the graph Containers + + + + + + + + + + + + + +
- 27.30 ns + 572.9 ns - 299.8 ns + 14.35 μs - 3.016 μs + 3.380 ms - 31.03 μs + 417.1 ms
- 89.62 ns + 113.1 ns + + 2.335 μs + + 169.7 μs + + 29.44 ms +
+ Fgl + + 205.2 ns + + 5.940 μs + + 573.4 μs + + 121.0 ms +
+ Hash-Graph + + 63.26 ns - 2.121 μs + 5.782 μs - 263.7 μs + 560.5 μs - 79.36 ms + 113.6 ms
@@ -411,17 +426,20 @@ Description: Transpose (invert all the edges) the graph SUMMARY: - * Alga was the fastest 4 times + * Containers was the fastest 3 times + * Hash-Graph was the fastest 1 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 2557.16 times faster than Containers + * Containers was 14.17 times faster than Alga + * Hash-Graph was 3.67 times faster than Alga + * Fgl was 3.45 times faster than Alga -## vertexCount +## edgeCount -Description: Count the vertices of the graph +Description: Count the edges of the graph ### Clique @@ -446,16 +464,16 @@ Description: Count the vertices of the graph Alga @@ -463,16 +481,16 @@ Description: Count the vertices of the graph Containers @@ -480,16 +498,16 @@ Description: Count the vertices of the graph Fgl @@ -497,16 +515,16 @@ Description: Count the vertices of the graph Hash-Graph
- 32.15 ns + 39.07 ns - 1.183 μs + 3.561 μs - 26.06 μs + 137.3 μs - 434.3 μs + 97.17 ms
- 20.93 ns + 28.15 ns - 20.52 ns + 257.2 ns - 22.33 ns + 28.44 μs - 20.48 ns + 21.22 ms
- 24.04 ns + 33.19 ns - 102.5 ns + 1.876 μs - 942.0 ns + 208.1 μs - 10.29 μs + 112.2 ms
- 24.35 ns + 39.78 ns - 88.99 ns + 1.004 μs - 797.1 ns + 58.04 μs - 9.006 μs + 6.288 ms
@@ -514,19 +532,20 @@ Description: Count the vertices of the graph SUMMARY: - * Containers was the fastest 4 times + * Containers was the fastest 3 times + * Hash-Graph was the fastest 1 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Containers was 21209.74 times faster than Alga - * Hash-Graph was 48.22 times faster than Alga - * Fgl was 42.21 times faster than Alga + * Hash-Graph was 17.85 times faster than Fgl + * Containers was 5.29 times faster than Fgl + * Alga was 1.16 times faster than Fgl -## edgeCount +## edgeList -Description: Count the edges of the graph +Description: Produce a list of the edges in the graph ### Clique @@ -551,16 +570,16 @@ Description: Count the edges of the graph Alga @@ -568,16 +587,16 @@ Description: Count the edges of the graph Containers @@ -585,16 +604,16 @@ Description: Count the edges of the graph Fgl @@ -602,16 +621,16 @@ Description: Count the edges of the graph Hash-Graph
- 55.18 ns + 33.99 ns - 6.311 μs + 3.597 μs - 349.7 μs + 146.5 μs - 73.80 ms + 84.28 ms
- 30.79 ns + 37.56 ns - 262.6 ns + 861.9 ns - 26.85 μs + 78.68 μs - 26.26 ms + 22.73 ms
- 34.88 ns + 32.31 ns - 1.985 μs + 2.974 μs - 207.2 μs + 322.8 μs - 104.9 ms + 131.1 ms
- 39.75 ns + 33.83 ns - 997.7 ns + 1.792 μs - 59.34 μs + 305.1 μs - 6.379 ms + 245.6 ms
@@ -620,19 +639,20 @@ Description: Count the edges of the graph SUMMARY: * Containers was the fastest 3 times - * Hash-Graph was the fastest 1 times + + There was 1 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Hash-Graph was 16.45 times faster than Fgl - * Containers was 4.00 times faster than Fgl - * Alga was 1.42 times faster than Fgl + * Containers was 10.80 times faster than Hash-Graph + * Alga was 2.91 times faster than Hash-Graph + * Fgl was 1.87 times faster than Hash-Graph -## hasEdge +## equality -Description: Test if the given edge is in the graph (with arguments both in the graph and not in the graph (where applicable)) +Description: Test if two graphs are equals ### Clique @@ -657,16 +677,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Alga @@ -674,16 +694,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Containers @@ -691,16 +711,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Fgl @@ -708,16 +728,16 @@ Description: Test if the given edge is in the graph (with arguments both in the Hash-Graph
- 679.0 ns + 392.3 ns - 2.005 μs + 4.616 μs - 7.297 μs + 126.1 μs - 59.87 μs + 10.47 ms
- 28.98 ns + 29.05 ns - 116.6 ns + 266.4 ns - 1.143 μs + 23.92 μs - 10.30 μs + 10.57 ms
- 115.0 ns + 162.7 ns - 1.390 μs + 13.87 μs - 18.92 μs + 3.047 ms - 491.6 μs + 569.8 ms
- 106.5 ns + 64.49 ns - 145.9 ns + 4.106 μs - 167.3 ns + 436.8 μs - 177.0 ns + 56.09 ms
@@ -725,20 +745,22 @@ Description: Test if the given edge is in the graph (with arguments both in the SUMMARY: - * Hash-Graph was the fastest 13 times * Containers was the fastest 6 times + * Alga was the fastest 1 times + + There was 1 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Hash-Graph was 3157.39 times faster than Fgl - * Containers was 49.29 times faster than Fgl - * Alga was 8.70 times faster than Fgl + * Containers was 104.41 times faster than Fgl + * Alga was 77.93 times faster than Fgl + * Hash-Graph was 18.54 times faster than Fgl -## isEmpty +## hasEdge -Description: Test if the graph is empty +Description: Test if the given edge is in the graph (with arguments both in the graph and not in the graph (where applicable)) ### Clique @@ -763,16 +785,33 @@ Description: Test if the graph is empty Alga + + + + + + + @@ -780,16 +819,16 @@ Description: Test if the graph is empty Fgl @@ -797,16 +836,16 @@ Description: Test if the graph is empty Hash-Graph
- 21.18 ns + 37.33 ns + + 188.1 ns + + 1.282 μs + + 13.74 μs +
+ Containers + + 27.25 ns - 24.69 ns + 97.83 ns - 25.05 ns + 898.0 ns - 25.07 ns + 9.442 μs
- 20.22 ns + 118.6 ns - 20.21 ns + 1.351 μs - 20.34 ns + 18.39 μs - 20.30 ns + 458.8 μs
- 20.15 ns + 98.48 ns - 20.10 ns + 148.0 ns - 20.06 ns + 162.9 ns - 20.14 ns + 177.8 ns
@@ -814,15 +853,18 @@ Description: Test if the graph is empty SUMMARY: + * Hash-Graph was the fastest 12 times + * Containers was the fastest 6 times - There was 4 ex-aequo + There was 1 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Hash-Graph was 1.24 times faster than Alga - * Fgl was 1.23 times faster than Alga + * Hash-Graph was 3059.71 times faster than Fgl + * Containers was 51.47 times faster than Fgl + * Alga was 37.64 times faster than Fgl ## hasVertex @@ -851,16 +893,33 @@ Description: Test if the given vertex is in the graph Alga - 33.58 ns + 23.10 ns + + + 100.0 ns + + + 571.1 ns + + + 5.494 μs + + + + + Containers + + + 21.83 ns - 128.3 ns + 22.00 ns - 892.2 ns + 21.64 ns - 8.586 μs + 21.65 ns @@ -868,16 +927,16 @@ Description: Test if the given vertex is in the graph Fgl - 53.80 ns + 43.11 ns - 664.1 ns + 613.1 ns - 11.58 μs + 11.56 μs - 327.1 μs + 327.2 μs @@ -885,16 +944,16 @@ Description: Test if the given vertex is in the graph Hash-Graph - 25.50 ns + 25.55 ns - 33.67 ns + 32.01 ns - 37.71 ns + 37.02 ns - 42.50 ns + 41.35 ns @@ -902,8 +961,7 @@ Description: Test if the given vertex is in the graph SUMMARY: - * Hash-Graph was the fastest 10 times - * Alga was the fastest 1 times + * Containers was the fastest 11 times There was 3 ex-aequo @@ -911,12 +969,13 @@ SUMMARY: ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Hash-Graph was 224.55 times faster than Alga - * Fgl was 94.75 times faster than Alga + * Containers was 11.74 times faster than Alga + * Hash-Graph was 6.26 times faster than Alga + * Fgl was 1.42 times faster than Alga -## addEdge +## isEmpty -Description: Add an edge (not already in the graph) +Description: Test if the graph is empty ### Clique @@ -941,16 +1000,33 @@ Description: Add an edge (not already in the graph) Alga + + + + + + + @@ -958,16 +1034,16 @@ Description: Add an edge (not already in the graph) Fgl @@ -975,16 +1051,16 @@ Description: Add an edge (not already in the graph) Hash-Graph
- 48.51 ns + 19.80 ns - 205.6 ns + 23.74 ns - 1.176 μs + 22.80 ns - 11.28 μs + 23.10 ns +
+ Containers + + 18.15 ns + + 18.08 ns + + 18.06 ns + + 18.05 ns
- 117.1 ns + 18.90 ns - 2.083 μs + 19.26 ns - 192.1 μs + 18.28 ns - 29.27 ms + 18.83 ns
- 169.9 ns + 17.80 ns - 4.242 μs + 19.05 ns - 385.3 μs + 17.97 ns - 39.72 ms + 19.58 ns
@@ -992,18 +1068,20 @@ Description: Add an edge (not already in the graph) SUMMARY: - * Alga was the fastest 13 times + + There was 4 ex-aequo ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 3517.50 times faster than Hash-Graph - * Fgl was 1.36 times faster than Hash-Graph + * Containers was 1.28 times faster than Alga + * Fgl was 1.23 times faster than Alga + * Hash-Graph was 1.18 times faster than Alga -## addVertex +## mergeContext -Description: Add a vertex (not already in the graph) +Description: Merge a FGL context in the graph ### Clique @@ -1023,38 +1101,21 @@ Description: Add a vertex (not already in the graph) 1000 - - - - - - - @@ -1062,35 +1123,37 @@ Description: Add a vertex (not already in the graph) Hash-Graph
- Alga - - 37.30 ns - - 146.1 ns - - 1.127 μs - - 11.00 μs -
Fgl - 72.45 ns + 110.9 ns - 1.911 μs + 1.989 μs - 191.1 μs + 198.2 μs - 29.54 ms + 28.23 ms
- 107.2 ns + 117.5 ns - 3.958 μs + 3.667 μs - 372.3 μs + 379.8 μs - 41.24 ms + 39.42 ms
+Not implemented for Containers because it is a nonsense. +Not implemented for Alga because it is a nonsense. SUMMARY: - * Alga was the fastest 8 times + * Fgl was the fastest 11 times + * Hash-Graph was the fastest 1 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 3739.68 times faster than Hash-Graph - * Fgl was 1.40 times faster than Hash-Graph + * Fgl was 1.39 times faster than Hash-Graph -## removeVertex +## reachable -Description: Remove a vertex of the graph +Description: Produce a list of reachable vertices from a given one ### Clique @@ -1115,16 +1178,33 @@ Description: Remove a vertex of the graph Alga + + + + + + + @@ -1132,16 +1212,16 @@ Description: Remove a vertex of the graph Fgl @@ -1149,16 +1229,16 @@ Description: Remove a vertex of the graph Hash-Graph
- 34.79 ns + 743.8 ns + + 9.689 μs + + 1.586 ms + + 213.2 ms +
+ Containers + + 122.6 ns - 350.0 ns + 1.063 μs - 3.091 μs + 81.28 μs - 32.64 μs + 16.26 ms
- 62.98 ns + 279.4 ns - 2.319 μs + 4.613 μs - 202.5 μs + 320.0 μs - 29.18 ms + 61.30 ms
- 74.08 ns + 61.33 ns - 7.320 μs + 2.891 μs - 519.0 μs + 279.1 μs - 48.43 ms + 68.27 ms
@@ -1166,14 +1246,16 @@ Description: Remove a vertex of the graph SUMMARY: - * Alga was the fastest 8 times + * Hash-Graph was the fastest 4 times + * Containers was the fastest 3 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 1482.40 times faster than Hash-Graph - * Fgl was 1.66 times faster than Hash-Graph + * Hash-Graph was 221.32 times faster than Alga + * Containers was 25.66 times faster than Alga + * Fgl was 3.46 times faster than Alga ## removeEdge @@ -1199,13 +1281,27 @@ Description: Remove an edge of the graph Alga - 2.900 μs + 2.381 μs + + + 20.60 μs + + + 255.7 μs + + + + + Containers + + + 644.8 ns - 26.62 μs + 39.54 μs - 333.6 μs + 23.64 ms @@ -1213,13 +1309,13 @@ Description: Remove an edge of the graph Fgl - 4.471 μs + 4.435 μs - 233.1 μs + 238.1 μs - 32.85 ms + 30.54 ms @@ -1227,13 +1323,13 @@ Description: Remove an edge of the graph Hash-Graph - 4.014 μs + 4.026 μs - 378.2 μs + 367.6 μs - 40.29 ms + 41.58 ms @@ -1241,11 +1337,527 @@ Description: Remove an edge of the graph SUMMARY: - * Alga was the fastest 9 times + * Alga was the fastest 6 times + * Containers was the fastest 3 times ABSTRACT: (Based on an average of the ratio between largest benchmarks) - * Alga was 120.87 times faster than Hash-Graph - * Fgl was 1.23 times faster than Hash-Graph + * Alga was 163.06 times faster than Hash-Graph + * Containers was 1.76 times faster than Hash-Graph + * Fgl was 1.36 times faster than Hash-Graph + +## removeVertex + +Description: Remove a vertex of the graph + +### Clique + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 1 + + 10 + + 100 + + 1000 +
+ Alga + + 30.90 ns + + 340.8 ns + + 2.928 μs + + 30.81 μs +
+ Containers + + 34.90 ns + + 755.9 ns + + 42.36 μs + + 22.37 ms +
+ Fgl + + 83.19 ns + + 2.529 μs + + 213.2 μs + + 29.73 ms +
+ Hash-Graph + + 78.62 ns + + 6.574 μs + + 435.7 μs + + 42.43 ms +
+ + +ABSTRACT: +(Based on an average of the ratio between largest benchmarks) + + * Alga was 1377.35 times faster than Hash-Graph + * Containers was 1.90 times faster than Hash-Graph + * Fgl was 1.43 times faster than Hash-Graph + +## topSort + +Description: Topological sorting of the vertices + +### Clique + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 1 + + 10 + + 100 + + 1000 +
+ Alga + + 586.5 ns + + 15.48 μs + + 2.971 ms + + 395.6 ms +
+ Containers + + 153.3 ns + + 2.491 μs + + 172.2 μs + + 28.08 ms +
+ Fgl + + 421.3 ns + + 9.675 μs + + 820.7 μs + + 142.3 ms +
+ Hash-Graph + + 206.5 ns + + 7.264 μs + + 339.8 μs + + 36.24 ms +
+ + +ABSTRACT: +(Based on an average of the ratio between largest benchmarks) + + * Containers was 14.09 times faster than Alga + * Hash-Graph was 10.92 times faster than Alga + * Fgl was 2.78 times faster than Alga + +## transpose + +Description: Transpose (invert all the edges) the graph + +### Clique + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 1 + + 10 + + 100 + + 1000 +
+ Alga + + 25.77 ns + + 313.6 ns + + 2.838 μs + + 28.99 μs +
+ Containers + + 88.96 ns + + 2.061 μs + + 272.4 μs + + 96.98 ms +
+ Fgl + + 114.6 ns + + 12.88 μs + + 2.182 ms + + 396.2 ms +
+ Hash-Graph + + 52.62 ns + + 13.91 μs + + 4.246 ms + + 773.6 ms +
+ + +ABSTRACT: +(Based on an average of the ratio between largest benchmarks) + + * Alga was 26686.27 times faster than Hash-Graph + * Containers was 7.98 times faster than Hash-Graph + * Fgl was 1.95 times faster than Hash-Graph + +## vertexCount + +Description: Count the vertices of the graph + +### Clique + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 1 + + 10 + + 100 + + 1000 +
+ Alga + + 30.68 ns + + 201.0 ns + + 2.281 μs + + 37.06 μs +
+ Containers + + 20.87 ns + + 20.95 ns + + 20.94 ns + + 20.90 ns +
+ Fgl + + 20.56 ns + + 102.3 ns + + 917.4 ns + + 10.53 μs +
+ Hash-Graph + + 22.32 ns + + 83.46 ns + + 792.2 ns + + 8.835 μs +
+ + +SUMMARY: + + * Containers was the fastest 3 times + + There was 1 ex-aequo + + +ABSTRACT: +(Based on an average of the ratio between largest benchmarks) + + * Containers was 1773.10 times faster than Alga + * Hash-Graph was 4.19 times faster than Alga + * Fgl was 3.52 times faster than Alga + +## vertexList + +Description: Produce a list of the vertices in the graph + +### Clique + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 1 + + 10 + + 100 + + 1000 +
+ Alga + + 40.90 ns + + 308.6 ns + + 3.293 μs + + 45.92 μs +
+ Containers + + 31.70 ns + + 150.3 ns + + 1.072 μs + + 10.39 μs +
+ Fgl + + 53.32 ns + + 459.8 ns + + 4.914 μs + + 46.78 μs +
+ Hash-Graph + + 23.10 ns + + 201.0 ns + + 2.247 μs + + 26.21 μs +
+ + +SUMMARY: + + * Containers was the fastest 3 times + * Hash-Graph was the fastest 1 times + + +ABSTRACT: +(Based on an average of the ratio between largest benchmarks) + + * Containers was 4.50 times faster than Fgl + * Hash-Graph was 1.79 times faster than Fgl + * Alga was 1.02 times faster than Fgl + diff --git a/results/TIME-extra.svg b/results/TIME-extra.svg new file mode 100644 index 0000000..65c17ae --- /dev/null +++ b/results/TIME-extra.svg @@ -0,0 +1,4004 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 959650d3332b7e4c163cad24d84db182ecd06425 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Tue, 7 Aug 2018 14:54:28 +0200 Subject: [PATCH 11/25] Update md --- README.md | 10 ++++------ results/README.md | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 93325e7..6d39767 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ # Benchmark suite for graph libraries -## Warning: Under Active Developement -This is being developed as part of the Google Summer of Code 2018. -Please do not expect anything from the code for now. - -Feel free to open an issue anyway :) +## Intro +This project was developed as part of the Google Summer of Code 2018. +Feel free to open an issue :) ## Results Current results of `cabal bench time` and `cabal bench space` can be found here: https://travis-ci.org/haskell-perf/graphs @@ -21,7 +19,7 @@ You can customize your build using several cabal flags (all of them are on by de * Time: will produce a benchmark suite using `criterion`. * Space: will produce a benchmark suite using `weigh`. -* Datasize: will produce a benchmark suite using `ghc-datasize`. +* Datasize: will produce a benchmark suite using `ghc-datasize` (disabled by default). ### Libraries diff --git a/results/README.md b/results/README.md index 0a7d9f3..aaa8831 100644 --- a/results/README.md +++ b/results/README.md @@ -14,7 +14,7 @@ In this folder, you will find the lastest benchmarks of 4 haskell graphs librari * [FGL v5.6.0.0](https://hackage.haskell.org/package/fgl-5.6.0.0) * [Hash-Graph (not yet on hackage)](https://github.com/patrickdoc/hash-graph) -The benchmarks were realised using `Stack` and the `stack.newest.yaml` configuration +The benchmarks were realised using `Stack` and the `stack.yaml` configuration ## Tools @@ -27,7 +27,7 @@ The benchmarks were realised using `Stack` and the `stack.newest.yaml` configura ### Benchmarking routine For the main results, we produce a generic list of edges (in ascending orders, but none of the libraries rely on this), create a graph from it, fully evaluate this graph to Normal Form, then pass it to then benchmarked function. -This may not reflect the reality, so we produced https://github.com/haskell-perf/graphs/blob/master/results/TIME-creation.md where the creation time (from a list of edges) is taken into account. +This may not reflect the reality, so we produced where the creation time (from a list of edges) is taken into account. ### The list of edges From c2a853b48b9c7e1b9f9fbd82c222fcdc9abfa62d Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Tue, 7 Aug 2018 15:24:48 +0200 Subject: [PATCH 12/25] Better readme --- README.md | 3 +++ results/README.md | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d39767..a43f86e 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ This project was developed as part of the Google Summer of Code 2018. Feel free to open an issue :) ## Results + +![svg](https://raw.githubusercontent.com/haskell-perf/graphs/newStack/results/TIME.svg?sanitize=true) + Current results of `cabal bench time` and `cabal bench space` can be found here: https://travis-ci.org/haskell-perf/graphs Results on bigger graphs and with more beautiful output can be found here: diff --git a/results/README.md b/results/README.md index aaa8831..465489d 100644 --- a/results/README.md +++ b/results/README.md @@ -1,9 +1,12 @@ ## Results * Time: https://github.com/haskell-perf/graphs/blob/master/results/TIME.md + +![svg](https://raw.githubusercontent.com/haskell-perf/graphs/newStack/results/TIME.svg?sanitize=true) + * Space: https://github.com/haskell-perf/graphs/blob/master/results/SPACE.md -Note: Some functions of Data.Graph was not in the original library (`edgeCount` and `hasEdge`), their defintion can be found in `bench/Containers/Graph.hs` +Note: Some functions of some libraries are not implemented so we use a "hand-made" implementation. Defintions can be found in `bench/`. Suggestions are welcome! ## What is benchmarked @@ -31,7 +34,7 @@ This may not reflect the reality, so we produced where we used the alga representation instead of a list of edges. ## Some words about graphs The functions are benchmarked against: @@ -56,9 +59,11 @@ The functions are benchmarked against: The two first graphs are built with successive ten powers vertices. Here, with 1, 10, 100 and 1000 vertices. ### Types + Libraries are benchmarked against graphs with *Int* vertices. ## About arguments + All the functions are tested with arguments in the _domain_ of the graph, where applicable: unless it is mentioned, edges and vertices generated for the test can be in the complete graph with the same number of vertices. ## Remarks From 7a005257ed1e53bf0f5c04b620d671d44faf24e1 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Tue, 7 Aug 2018 15:29:38 +0200 Subject: [PATCH 13/25] 3 charts --- README.md | 2 +- results/README.md | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a43f86e..3f19eea 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Feel free to open an issue :) ![svg](https://raw.githubusercontent.com/haskell-perf/graphs/newStack/results/TIME.svg?sanitize=true) -Current results of `cabal bench time` and `cabal bench space` can be found here: https://travis-ci.org/haskell-perf/graphs +Current results of `cabal bench time` and `cabal bench space` can be found here: Results on bigger graphs and with more beautiful output can be found here: diff --git a/results/README.md b/results/README.md index 465489d..fd16b82 100644 --- a/results/README.md +++ b/results/README.md @@ -30,11 +30,22 @@ The benchmarks were realised using `Stack` and the `stack.yaml` configuration ### Benchmarking routine For the main results, we produce a generic list of edges (in ascending orders, but none of the libraries rely on this), create a graph from it, fully evaluate this graph to Normal Form, then pass it to then benchmarked function. -This may not reflect the reality, so we produced where the creation time (from a list of edges) is taken into account. + +#### Creation + +This may not reflect the reality, so we produced an alternative table where creation time (from a list of edges) is taken into account: + +![svg](https://raw.githubusercontent.com/haskell-perf/graphs/newStack/results/TIME-creation.svg?sanitize=true) + + ### The list of edges -Containers, Fgl and Hash-Graph are dealing well with a list of edges. This is *not* the case with Alga, so we produced where we used the alga representation instead of a list of edges. +Containers, Fgl and Hash-Graph are dealing well with a list of edges. This is *not* the case with Alga, so we produced an alternative table where we used the alga representation instead of a list of edges: + +![svg](https://raw.githubusercontent.com/haskell-perf/graphs/newStack/results/TIME-extra.svg?sanitize=true) + + ## Some words about graphs The functions are benchmarked against: From 060f9f1cedb46adfc32620a3f6aeedaf7f2134a9 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Tue, 7 Aug 2018 15:32:26 +0200 Subject: [PATCH 14/25] Add chart info --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 3f19eea..7e21eec 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,14 @@ The following graphs are supported: * Clique * RealLife (Note that because we have a limited set, you cannot request more than 4 real-life graphs) +### Charts + +One can produce a chart from the results, use: + +``` + -f,--chartfile FILENAME Output file WITHOUT extension + -c,--chart OUTTYPE Output type: Png or Svg +``` ## About implementation From a3763196177e8651c3ecbcfe23e3917d7b14a254 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Tue, 7 Aug 2018 16:02:23 +0200 Subject: [PATCH 15/25] Remove merge context of charts --- results/TIME-creation.svg | 2525 +++++++++++++++------------------ results/TIME-extra.svg | 1930 ++++++++++++-------------- results/TIME.svg | 2769 +++++++++++++++++-------------------- 3 files changed, 3272 insertions(+), 3952 deletions(-) diff --git a/results/TIME-creation.svg b/results/TIME-creation.svg index 77f7cf2..26be5bb 100644 --- a/results/TIME-creation.svg +++ b/results/TIME-creation.svg @@ -107,27 +107,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -988,544 +967,508 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1545,88 +1488,69 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3918,151 +3842,234 @@ - - - - - - - - - - - - + + + + + + + + + - + + - + + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + - - - - - - - + + + + + + + + + + + + + + + + + @@ -4099,180 +4106,158 @@ - - - - - - - - - + + + + + + + + + + - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - - + + + + + + - - + + @@ -4280,53 +4265,63 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4363,158 +4358,183 @@ - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + - - + + @@ -4522,63 +4542,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4615,18 +4625,13 @@ - - - - - - - - - - - - + + + + + + + @@ -4635,90 +4640,90 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4882,13 +4887,15 @@ - - - - - - - + + + + + + + + + @@ -4897,90 +4904,90 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5144,180 +5151,159 @@ - - - - - - - - - + + + + + + + + + + + - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - - + + + + + + - - + + @@ -5325,53 +5311,63 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5408,17 +5404,16 @@ - - - - - - - - - - - + + + + + + + + + + @@ -5428,90 +5423,90 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5660,257 +5655,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/results/TIME-extra.svg b/results/TIME-extra.svg index 65c17ae..3dd63d4 100644 --- a/results/TIME-extra.svg +++ b/results/TIME-extra.svg @@ -550,184 +550,172 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - + @@ -2624,85 +2612,107 @@ - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + - + - + - + + + + + + + - - + + + + + + + + + + - - - - - - + + + + + + + + + - - - - - - + + + + + + + + + - - - - - - + + + + + + + + + - - - - - - + + + + + + + + + - - - - - - + + + + + + + + + - - - - - - + + + + @@ -2715,74 +2725,54 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2794,167 +2784,146 @@ - - - - - - - - - + + + + + + + + + + - - - - + + + - - - - - - - - - - - - - + - + - + - + + + + - - - - + + + + + + + + + + + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2966,101 +2935,115 @@ - - - - - - - - - - + + + + + + + + + + + + - - - + + + + - - - - - - - - - - - - - + - + - + - + + + + - - - - + + + + + + + + + + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - + + @@ -3068,34 +3051,44 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + @@ -3117,170 +3110,186 @@ - - - - - - - - - - - - + + + + + + + - - - - + + + + + - - - - - - - - - - - - - + - + - + - + + + + + + + + + + - - - - + + + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3292,13 +3301,15 @@ - - - - - - - + + + + + + + + + @@ -3307,34 +3318,34 @@ - - - - - - - - - - - - - + - + - + - + + + + + + + + + + + + + - - - - + + + + @@ -3405,64 +3416,64 @@ - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - + + - - - - - - - - + + + + + + + + @@ -3483,188 +3494,169 @@ - - - - - - - - - + + + + + + + + + + + - - - - - + + + + - - - - - - - - - - - - - + - + - + - + + + + + + + - - - - + + + + + + + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3676,159 +3668,136 @@ - - - - - - - - - - - + + + + + + + + + + - - - - + + + - - - - - - - - - - - - - + - + - + - + - - - - + + + + + + + + + + + + + + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3849,156 +3818,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/results/TIME.svg b/results/TIME.svg index c966c60..84b704c 100644 --- a/results/TIME.svg +++ b/results/TIME.svg @@ -1060,544 +1060,508 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -4248,124 +4212,175 @@ - - - - - - - - - - - - + + + + + + + + + - - - - + + + + + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + @@ -4378,54 +4393,63 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4453,175 +4477,153 @@ - - - - - - - - - + + + + + + + + + + - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - - + + + + + + @@ -4634,59 +4636,68 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -4718,153 +4729,178 @@ - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + @@ -4877,68 +4913,59 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -4970,183 +4997,166 @@ - - - - - - - - - - - - + + + + + + + - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + - - + + @@ -5154,54 +5164,44 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5238,13 +5238,15 @@ - - - - - - - + + + + + + + + + @@ -5252,90 +5254,90 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5479,222 +5481,203 @@ - - - - - - - - - + + + + + + + + + + + - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5722,193 +5705,214 @@ - - - - - - - - - - - + + + + + + + + + + - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5945,250 +5949,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 1675d5ed36b04d38ce913ef73a9c9bdae77b91ee Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Wed, 8 Aug 2018 17:08:20 +0200 Subject: [PATCH 16/25] More precise results --- README.md | 9 ++++++--- results/TIME-creation.md | 6 ++++++ results/TIME.md | 6 ++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7e21eec..1c658d5 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,13 @@ The benchmark suite `datasize` will use `ghc-datasize` to calculate size of grap ### Arguments Command-line arguments are self-explaining, but the `--graph "(String,Int)"` requires some explanations: -We test functions against standards graphs, and they are built with ten-powers vertices. For standard graphs, the Int supplied is the upper-bound of the ten-powers. So `"(Path,100)"` will generate the `Path` with `1`, `10` and `100` vertices. You can specify several graphs. +Standards graphs are built with ten-powers vertices. The `Int` supplied is the upper-bound of these ten-powers. So `"(Path,3)"` will generate three `Path` with `1`, `10` and `100` vertices. You can specify several graphs. -The default is: `[("Mesh",3),("Clique",3)]` +You can force the suite to use only bigger graphs with the `-i` flag. + +The default is: `[("Mesh",3),("Clique",3)]`. + +For real-life graphs (see below) you cannot use an integer greater than 4. #### Real-life graphs @@ -140,7 +144,6 @@ data Suite g = forall i o. NFData o => Suite This module defines common builders for `Suite`, and particularly provides stable names for standard operations on graphs, and thus allows for simpler comparison (remember, benchmarks are identified by their _name_). - ### Benchmarking with creation? We provide two ways of benchmarking: diff --git a/results/TIME-creation.md b/results/TIME-creation.md index 427a60e..a3d6002 100644 --- a/results/TIME-creation.md +++ b/results/TIME-creation.md @@ -1,3 +1,9 @@ +The content of this file was obtained with: + +``` +$ time run -g '("Clique",4)' -g '("Mesh",4)' -g '("RealLife",4)' -d Html -c +``` + # Benchmarks Doing: diff --git a/results/TIME.md b/results/TIME.md index f3be8f9..cf02b93 100644 --- a/results/TIME.md +++ b/results/TIME.md @@ -1,3 +1,9 @@ +The content of this file was obtained with: + +``` +$ time run -g '("Clique",4)' -g '("Mesh",4)' -g '("RealLife",4)' -d Html +``` + # Benchmarks Doing: From 34fda115e3a588ee4731ef0a9f3ff2f89f39d5db Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Fri, 10 Aug 2018 18:57:14 +0200 Subject: [PATCH 17/25] Update travis --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b6c4f3a..54890d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,8 +45,7 @@ script: # Build the package, its tests, and its docs and run the tests - stack --no-terminal bench --no-run-benchmarks - PREFIX=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build -- if [ $DO = SPACE ]; then travis_wait 30 $PREFIX/space/space; else $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; - +- if [ $DO = SPACE ]; then travis_wait 30 $PREFIX/space/space; else timeout 45m $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; before_install: # Download and unpack the stack executable From 4574fdf74cf00582d277f129ae87e4a93c5a8cb8 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Fri, 10 Aug 2018 19:59:19 +0200 Subject: [PATCH 18/25] Better raw results --- bench/Space.hs | 6 +++--- bench/Time.hs | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bench/Space.hs b/bench/Space.hs index 49bda48..c85d451 100644 --- a/bench/Space.hs +++ b/bench/Space.hs @@ -67,7 +67,7 @@ takeLastAfterBk w = case elemIndices '/' w of useResults :: Output -> [Named (Named String)] -> [Grouped (Weight, Maybe String)] -> IO () useResults flg notDef todo = do putStrLn "Note: results are in bytes" - results <- mapM mapped $ nubBy (liftExtract2 eqG) namedBenchs + results <- fmap catMaybes $ mapM mapped $ nubBy (liftExtract2 eqG) namedBenchs maybe (return ()) (\x -> writeFile x $ show results) $ saveToFile flg case figOut flg of Nothing -> return () @@ -91,9 +91,9 @@ useResults flg notDef todo = do printAbstract "lighter" onlyLargeBenchs return $ Just (showGrouped $ snd e, onlyLargeBenchs) -renderG :: T.ChartOutput -> [Maybe (Named (T.Grouped [Named Double]))] -> IO () +renderG :: T.ChartOutput -> [Named (T.Grouped [Named Double])] -> IO () #ifdef CHART -renderG x results = mkChart "Space results" defaultGr show x $ Left $ sortBy (on compare fst) $ catMaybes results +renderG x results = mkChart "Space results" defaultGr show x $ Left $ sortBy (on compare fst) results #else renderG _ _ = return () #endif diff --git a/bench/Time.hs b/bench/Time.hs index c7ba843..f450a04 100644 --- a/bench/Time.hs +++ b/bench/Time.hs @@ -79,11 +79,11 @@ genReport gr flg arr = do unless notquickComp $ putStrLn $ let comp = head libNames oth = head $ tail libNames in unwords ["\nComparing",comp,"to",oth,". It means that the displayed number will be k such that", comp,"= k *", oth ] - results <- mapM mapped $ nubBy (liftExtract2 (==)) refinedarr + results <- fmap catMaybes $ mapM mapped $ nubBy (liftExtract2 (==)) refinedarr maybe (return ()) (\x -> writeFile x $ unlines [show gr,show results]) $ saveToFile flg case figOut flg of Nothing -> return () - (Just x) -> renderG gr x results + (Just x) -> renderG gr x results where mapped e = do let bname = showBenchName $ snd e @@ -110,9 +110,9 @@ genReport gr flg arr = do notquickComp = staOut flg /= QuickComparison (noimpl,refinedarr) = partitionEithers $ map stripOutEither arr -renderG :: [(String,Int)] -> ChartOutput -> [Maybe (Name, Grouped [(Name, (Double, Double))])] -> IO () +renderG :: [(String,Int)] -> ChartOutput -> [(Name, Grouped [(Name, (Double, Double))])] -> IO () #ifdef CHART -renderG gr x results = mkChart "Time results" gr secs x $ Right $ sortBy (on compare fst) $ catMaybes results +renderG gr x results = mkChart "Time results" gr secs x $ Right $ sortBy (on compare fst) results #else renderG _ _ _ = return () #endif From 3912ea6d9606a060c45a9cf2d90c5c6dd01264a8 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Fri, 10 Aug 2018 20:17:07 +0200 Subject: [PATCH 19/25] Even better travis --- .travis.yml | 5 +---- travis.sh | 7 +++++++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100755 travis.sh diff --git a/.travis.yml b/.travis.yml index 54890d7..750702b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,10 +42,7 @@ install: - stack --no-terminal --install-ghc bench --only-dependencies script: -# Build the package, its tests, and its docs and run the tests -- stack --no-terminal bench --no-run-benchmarks -- PREFIX=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build -- if [ $DO = SPACE ]; then travis_wait 30 $PREFIX/space/space; else timeout 45m $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; +- timeout 45m ./travis.sh before_install: # Download and unpack the stack executable diff --git a/travis.sh b/travis.sh new file mode 100755 index 0000000..bb2325a --- /dev/null +++ b/travis.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +stack --no-terminal bench --no-run-benchmarks --flag "bench-graph:-reallife" + +PREFIX=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build + +if [ $DO = SPACE ]; then travis_wait 30 $PREFIX/space/space; else $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; From 766ce04a667a82056ce28cbba5fdd87d94dafdaf Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Fri, 10 Aug 2018 21:20:02 +0200 Subject: [PATCH 20/25] Update travis.sh --- travis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis.sh b/travis.sh index bb2325a..74e18e6 100755 --- a/travis.sh +++ b/travis.sh @@ -4,4 +4,4 @@ stack --no-terminal bench --no-run-benchmarks --flag "bench-graph:-reallife" PREFIX=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build -if [ $DO = SPACE ]; then travis_wait 30 $PREFIX/space/space; else $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; +if [ $DO = SPACE ]; then $PREFIX/space/space; else $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; From 49cab687c99dd5a91b2ceed5c9f137c76934c26b Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Fri, 10 Aug 2018 21:21:57 +0200 Subject: [PATCH 21/25] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 750702b..e85645a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ install: - stack --no-terminal --install-ghc bench --only-dependencies script: -- timeout 45m ./travis.sh +- travis_wait 45 timeout 45m ./travis.sh before_install: # Download and unpack the stack executable From 3028a027f617fa53482aa291580520d2f5164ce7 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Sat, 11 Aug 2018 21:04:05 +0200 Subject: [PATCH 22/25] Revert "Update .travis.yml" This reverts commit 49cab687c99dd5a91b2ceed5c9f137c76934c26b. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e85645a..750702b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ install: - stack --no-terminal --install-ghc bench --only-dependencies script: -- travis_wait 45 timeout 45m ./travis.sh +- timeout 45m ./travis.sh before_install: # Download and unpack the stack executable From a7010c92c310dcbcbc1dcea28316582f61bed0c5 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Sat, 11 Aug 2018 21:04:13 +0200 Subject: [PATCH 23/25] Revert "Update travis.sh" This reverts commit 766ce04a667a82056ce28cbba5fdd87d94dafdaf. --- travis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis.sh b/travis.sh index 74e18e6..bb2325a 100755 --- a/travis.sh +++ b/travis.sh @@ -4,4 +4,4 @@ stack --no-terminal bench --no-run-benchmarks --flag "bench-graph:-reallife" PREFIX=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build -if [ $DO = SPACE ]; then $PREFIX/space/space; else $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; +if [ $DO = SPACE ]; then travis_wait 30 $PREFIX/space/space; else $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; From 73ac86ac0079521bc8c2438b79b6a5d0ca9c3eef Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Sat, 11 Aug 2018 21:04:20 +0200 Subject: [PATCH 24/25] Revert "Even better travis" This reverts commit 3912ea6d9606a060c45a9cf2d90c5c6dd01264a8. --- .travis.yml | 5 ++++- travis.sh | 7 ------- 2 files changed, 4 insertions(+), 8 deletions(-) delete mode 100755 travis.sh diff --git a/.travis.yml b/.travis.yml index 750702b..54890d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,10 @@ install: - stack --no-terminal --install-ghc bench --only-dependencies script: -- timeout 45m ./travis.sh +# Build the package, its tests, and its docs and run the tests +- stack --no-terminal bench --no-run-benchmarks +- PREFIX=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build +- if [ $DO = SPACE ]; then travis_wait 30 $PREFIX/space/space; else timeout 45m $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; before_install: # Download and unpack the stack executable diff --git a/travis.sh b/travis.sh deleted file mode 100755 index bb2325a..0000000 --- a/travis.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -stack --no-terminal bench --no-run-benchmarks --flag "bench-graph:-reallife" - -PREFIX=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build - -if [ $DO = SPACE ]; then travis_wait 30 $PREFIX/space/space; else $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; From fb5d615bf16aa444bf55d49b9f33b1088f1e5b40 Mon Sep 17 00:00:00 2001 From: Alexandre Moine Date: Sat, 11 Aug 2018 21:04:59 +0200 Subject: [PATCH 25/25] Travis ok? --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 54890d7..a7160c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,7 @@ env: - DO=TIME STEP=0 - DO=TIME STEP=1 - DO=TIME STEP=2 +- DO=TIME STEP=3 - DO=SPACE install: @@ -45,7 +46,7 @@ script: # Build the package, its tests, and its docs and run the tests - stack --no-terminal bench --no-run-benchmarks - PREFIX=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build -- if [ $DO = SPACE ]; then travis_wait 30 $PREFIX/space/space; else timeout 45m $PREFIX/time/time run --part $STEP --of 3 -g '("Mesh",2)' -g '("Clique",2)' ; fi; +- if [ $DO = SPACE ]; then travis_wait 30 $PREFIX/space/space; else $PREFIX/time/time run --part $STEP --of 4 -g '("Mesh",2)' -g '("Clique",2)' ; fi; before_install: # Download and unpack the stack executable