Host Process Environment Information:
BenchmarkDotNet.Core=v0.9.9.0
OS=Microsoft Windows NT 6.2.9200.0
Processor=Intel(R) Core(TM) i7-4712HQ CPU 2.30GHz, ProcessorCount=8
Frequency=2240905 ticks, Resolution=446.2483 ns, Timer=TSC
CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
GC=Concurrent Workstation
JitModules=clrjit-v4.6.1590.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using BenchmarkDotNet.Configs; | |
using BenchmarkDotNet.Jobs; | |
using BenchmarkDotNet.Diagnostics.Windows; | |
namespace bigo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mergesort :: (a -> a -> Ordering) -> [a] -> [a] | |
mergesort cmp = mergesort' cmp . map wrap | |
mergesort' :: (a -> a -> Ordering) -> [[a]] -> [a] | |
mergesort' _ [] = [] | |
mergesort' _ [xs] = xs | |
mergesort' cmp xss = mergesort' cmp (merge_pairs cmp xss) | |
merge_pairs :: (a -> a -> Ordering) -> [[a]] -> [[a]] | |
merge_pairs _ [] = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using BenchmarkDotNet.Configs; | |
using BenchmarkDotNet.Jobs; | |
using BenchmarkDotNet.Diagnostics.Windows; | |
namespace bigo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Pricer.PerfTests | |
open System | |
open Pricer | |
open Pricer.Core | |
open BenchmarkDotNet.Attributes | |
open BenchmarkDotNet.Running | |
open BenchmarkDotNet.Configs | |
open BenchmarkDotNet.Jobs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate time; | |
//use std::io; | |
//use std::cmp::Ordering; | |
//use rand::Rng; | |
use time::{Duration,PreciseTime}; | |
fn add_array() -> f64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "time" | |
func main() { | |
var values [32000000]float64 | |
for i := 0; i < len(values); i++ { | |
values[i] = 2.0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using BenchmarkDotNet.Configs; | |
using BenchmarkDotNet.Jobs; | |
using BenchmarkDotNet.Diagnostics.Windows; | |
namespace bigo |
Simple mapping function (fun x -> x*x) 1,000,000 ints
Method | Length | Median | StdDev | Scaled | Gen 0 | Gen 1 | Gen 2 | Bytes Allocated/Op |
---------------- |-------- |---------- |---------- |------- |------ |------ |------- |------------------- | Parallelmap | 1000000 | 3.7892 ms | 0.4924 ms | 1.85 | - | - | 880.58 | 1,749,410.73 | map | 1000000 | 2.0427 ms | 0.0211 ms | 1.00 | - | - | 793.00 | 1,755,648.30 | SIMDmap | 1000000 | 1.7126 ms | 0.0175 ms | 0.84 | - | - | 777.53 | 1,721,123.56 | SIMDParallelmap | 1000000 | 1.6008 ms | 0.0267 ms | 0.78 | - | - | 926.58 | 1,590,658.22 |
More complex mapping function(fun x->x*(x*x+x+x/5.0f)) 1,000,000 float32s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let inline map (array : 'T[]) f : 'U[] = | |
let result = Array.zeroCreate array.Length | |
for i = 0 to array.Length-1 do | |
result.[i] <- f array.[i] | |
result | |
let inline poly_incr x = | |
x + LanguagePrimitives.GenericOne | |
[<EntryPoint>] |