Skip to content

Instantly share code, notes, and snippets.

@JosepER
Created March 13, 2022 18:45
Show Gist options
  • Save JosepER/767b6b9ac178092e25370416f7874fe0 to your computer and use it in GitHub Desktop.
Save JosepER/767b6b9ac178092e25370416f7874fe0 to your computer and use it in GitHub Desktop.
# Benchmarking a call to 'Inequality.gini' without weights,
# and with a vector of 1s as weights.
using BenchmarkTools
using Inequality
v = rand(1:10000, 300)
w = repeat([1], 300)
@benchmark gini($v) evals=15
@benchmark gini($v, $w) evals=15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment