Skip to content

Instantly share code, notes, and snippets.

@tkf

tkf/benchmark.md Secret

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

Benchmark Report for ForwardDiff

Job Properties

  • Time of benchmarks:
    • Target: 18 Jul 2018 - 18:07
    • Baseline: 18 Jul 2018 - 18:08
  • 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.94 (5%) ✅ 1.00 (1%)
["scalar p=2 width=4 r=1.0"] 0.94 (5%) ✅ 1.00 (1%)
["scalar p=2 width=8 r=0.0"] 0.78 (5%) ✅ 1.00 (1%)
["scalar p=2 width=8 r=1.0"] 0.78 (5%) ✅ 1.00 (1%)
["scalar p=3 width=4 r=0.0"] 0.71 (5%) ✅ 1.00 (1%)
["scalar p=3 width=4 r=1.0"] 0.49 (5%) ✅ 1.00 (1%)
["scalar p=3 width=8 r=0.0"] 0.66 (5%) ✅ 1.00 (1%)
["scalar p=3 width=8 r=1.0"] 0.49 (5%) ✅ 1.00 (1%)
["scalar p=4 width=8 r=0.0"] 0.94 (5%) ✅ 1.00 (1%)
["scalar p=5 width=8 r=0.0"] 0.93 (5%) ✅ 1.00 (1%)
["scalar p=6 width=8 r=0.0"] 0.92 (5%) ✅ 1.00 (1%)
["scalar p=7 width=8 r=0.0"] 0.95 (5%) ✅ 1.00 (1%)
["vector p=2 width=4"] 0.33 (5%) ✅ 1.00 (1%)
["vector p=2 width=8"] 0.44 (5%) ✅ 1.00 (1%)
["vector p=3 width=4"] 0.11 (5%) ✅ 1.00 (1%)
["vector p=3 width=8"] 0.14 (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) Core(TM) i7-4500U CPU @ 1.80GHz
  WORD_SIZE: 64
  uname: Linux 4.14.55-1-lts #1 SMP Wed Jul 11 18:24:20 CEST 2018 x86_64 unknown
Memory: 7.7059173583984375 GB (2790.765625 MB free)
Uptime: 10561.0 sec
Load Avg:  1.28076171875  0.84619140625  0.5478515625
Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz: 
       speed         user         nice          sys         idle          irq
#1  2682 MHz      55133 s       5798 s       9321 s     979221 s          0 s
#2  2681 MHz      38503 s       5329 s       8270 s     998317 s          0 s
#3  2756 MHz      52495 s       5141 s       9325 s     982729 s          0 s
#4  2714 MHz      43482 s       6672 s       8069 s     993955 s          0 s

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

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) Core(TM) i7-4500U CPU @ 1.80GHz
  WORD_SIZE: 64
  uname: Linux 4.14.55-1-lts #1 SMP Wed Jul 11 18:24:20 CEST 2018 x86_64 unknown
Memory: 7.7059173583984375 GB (2768.58984375 MB free)
Uptime: 10612.0 sec
Load Avg:  1.74560546875  1.041015625  0.63134765625
Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz: 
       speed         user         nice          sys         idle          irq
#1  2682 MHz      55444 s       5828 s       9424 s     983765 s          0 s
#2  2677 MHz      39390 s       5377 s       8355 s    1002317 s          0 s
#3  2770 MHz      53012 s       5168 s       9424 s     987043 s          0 s
#4  2824 MHz      47705 s       6682 s       8116 s     994676 s          0 s

  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=16)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
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