-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
33 lines (27 loc) · 1.34 KB
/
Program.cs
File metadata and controls
33 lines (27 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
using BenchmarkDotNet.Running;
var bench = new ComparisonBenchmarks();
bench.Setup();
static void Print(string label, Func<int> compute) =>
Console.WriteLine($" {label,-22} {compute(),6:N0} triangles");
const int lineWidth = 38;
Console.WriteLine("Constrained Delaunay Triangulation");
Console.WriteLine(new string('-', lineWidth));
Print("CDT.NET", bench.CDT_CdtNet);
Print("artem-ogre/CDT (C++)", bench.CDT_NativeCdt);
Print("Spade (Rust)", bench.CDT_Spade);
Print("CGAL (C++)", bench.CDT_Cgal);
Print("Triangle.NET", bench.CDT_TriangleNet);
Console.WriteLine(new string('-', lineWidth));
Console.WriteLine("Conforming Delaunay Triangulation");
Console.WriteLine(new string('-', lineWidth));
Print("CDT.NET", bench.CfDT_CdtNet);
Print("artem-ogre/CDT (C++)", bench.CfDT_NativeCdt);
Print("Spade (Rust)", bench.CfDT_Spade);
Print("CGAL (C++)", bench.CfDT_Cgal);
Print("NTS", bench.CfDT_Nts);
Print("Triangle.NET", bench.CfDT_TriangleNet);
Console.WriteLine(new string('-', lineWidth));
BenchmarkSwitcher.FromAssembly(typeof(ComparisonBenchmarks).Assembly).Run(args);