Skip to content

Instantly share code, notes, and snippets.

@alekseyl
Last active March 5, 2018 06:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alekseyl/8abc0d088f30602b44a02d1723fc26bb to your computer and use it in GitHub Desktop.
Save alekseyl/8abc0d088f30602b44a02d1723fc26bb to your computer and use it in GitHub Desktop.
Comparision of random samples
+----------------+-----------------+-----------------+-----------------+--------------+
| Array size | order by random | random() < 0.xx | generate_series | M partials |
| 10 | 0.25ms / 1.35 | 0.23ms / 1.2 | 0.12ms / 0.64 | 0.19ms / 1.0 |
| 100 | 0.58ms / 2.85 | 0.41ms / 2.04 | 0.14ms / 0.69 | 0.2ms / 1.0 |
| 1000 | 3.88ms / 7.3 | 2.49ms / 4.7 | 0.47ms / 0.88 | 0.53ms / 1.0 |
| 10000 | 45.59ms / 15.57 | 29.09ms / 9.94 | 2.87ms / 0.98 | 2.93ms / 1.0 |
+----------------+-----------------+-----------------+-----------------+--------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment