Skip to content

Instantly share code, notes, and snippets.

@tkf

tkf/benchmark.md Secret

Created July 19, 2018 01:46
A benchmark for ForwardDiff

Benchmark Report for ForwardDiff

Job Properties

  • Time of benchmarks:
    • Target: 18 Jul 2018 - 18:45
    • Baseline: 18 Jul 2018 - 18:46
  • Package commits:
    • Target: e7e054
    • Baseline: 6d0eb4
  • Julia commits:
    • Target: 9d11f6
    • Baseline: 9d11f6
  • Julia command flags:
    • Target: -O3
    • Baseline: -O3
  • Environment variables:
    • Target: None
    • Baseline: None

Results

A ratio greater than 1.0 denotes a possible regression (marked with ❌), while a ratio less than 1.0 denotes a possible improvement (marked with ✅). Only significant results - results that indicate possible regressions or improvements - are shown below (thus, an empty table means that all benchmark results remained invariant between builds).

ID time ratio memory ratio
["scalar p=2 width=4 r=0.0"] 0.78 (5%) ✅ 1.00 (1%)
["scalar p=2 width=4 r=1.0"] 0.78 (5%) ✅ 1.00 (1%)
["scalar p=2 width=8 r=0.0"] 0.89 (5%) ✅ 1.00 (1%)
["scalar p=2 width=8 r=1.0"] 0.91 (5%) ✅ 1.00 (1%)
["scalar p=3 width=4 r=0.0"] 0.62 (5%) ✅ 1.00 (1%)
["scalar p=3 width=4 r=1.0"] 0.44 (5%) ✅ 1.00 (1%)
["scalar p=3 width=8 r=0.0"] 0.63 (5%) ✅ 1.00 (1%)
["scalar p=3 width=8 r=1.0"] 0.48 (5%) ✅ 1.00 (1%)
["scalar p=4 width=4 r=1.0"] 0.93 (5%) ✅ 1.00 (1%)
["scalar p=5 width=4 r=1.0"] 0.92 (5%) ✅ 1.00 (1%)
["scalar p=6 width=8 r=0.0"] 0.93 (5%) ✅ 1.00 (1%)
["scalar p=7 width=4 r=0.0"] 0.94 (5%) ✅ 1.00 (1%)
["scalar p=7 width=8 r=0.0"] 0.92 (5%) ✅ 1.00 (1%)
["vector p=2 width=4"] 0.35 (5%) ✅ 1.00 (1%)
["vector p=2 width=8"] 0.43 (5%) ✅ 1.00 (1%)
["vector p=3 width=4"] 0.11 (5%) ✅ 1.00 (1%)
["vector p=3 width=8"] 0.13 (5%) ✅ 1.00 (1%)
["vector p=4 width=8"] 0.93 (5%) ✅ 1.00 (1%)

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • []

Julia versioninfo

Target

Julia Version 0.6.4
Commit 9d11f62bcb (2018-07-09 19:09 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
  WORD_SIZE: 64
           Ubuntu 16.04.4 LTS
  uname: Linux 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018 x86_64 x86_64
Memory: 125.78757095336914 GB (56187.703125 MB free)
Uptime: 3.559786e6 sec
Load Avg:  1.478515625  1.115234375  0.86767578125
Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz: 
          speed         user         nice          sys         idle          irq
#1-48  2899 MHz  211770187 s      11362 s  184121751 s  16682844955 s          0 s

  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=16)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, broadwell)

Baseline

Julia Version 0.6.4
Commit 9d11f62bcb (2018-07-09 19:09 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
  WORD_SIZE: 64
           Ubuntu 16.04.4 LTS
  uname: Linux 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018 x86_64 x86_64
Memory: 125.78757095336914 GB (56169.50390625 MB free)
Uptime: 3.559838e6 sec
Load Avg:  1.2919921875  1.1259765625  0.88818359375
Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz: 
          speed         user         nice          sys         idle          irq
#1-48  1200 MHz  211775416 s      11362 s  184121960 s  16683088863 s          0 s

  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=16)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, broadwell)
using ForwardDiff: Dual
using BenchmarkTools
const SUITE = BenchmarkGroup()
exp_taylor_expr(p::Int, x) =
reduce((a, b) -> :($a + $b), [:($x^$n * $(1 / factorial(n))) for n in 0:p])
@inline @generated exp_taylor(::Val{p}, x) where p = exp_taylor_expr(p, :x)
function vec_exp!(vp::Val, ys, xs)
@. ys = exp_taylor(vp, xs)
end
for p in 2:8, r in [0.0, 1.0], w in [4, 8]
x = Dual(r, (1:1.0:w)...)
SUITE["scalar p=$p width=$w r=$r"] = @benchmarkable exp_taylor($(Val(p)), $x)
end
for p in 2:8, w in [4, 8]
xs = Dual.(0:0.01:1, (1:1.0:w)...)
ys = copy(xs)
SUITE["vector p=$p width=$w"] = @benchmarkable vec_exp!($(Val(p)), $ys, $xs)
end
let xs = -1:0.1:1
@assert exp_taylor.(Val(12), xs) ≈ exp.(xs)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment