Current version (20 iterations of ProbablyPrime
):
$ go test -run none -bench=. -benchtime=60s
PASS
BenchmarkRSA2048Validate 1000 137668985 ns/op
...
Fewer (2) iterations of ProbablyPrime
:
... | |
| | |
* commit f44a3580b2a382ec22e90dad5d35e446bcd1d72b | |
| Author: Marc G. Fournier <scrappy@hub.org> | |
| Date: Sun Nov 1 16:55:02 1998 +0000 | |
| | |
| Remove various files that were moved to various subdirectories... | |
| | |
| Requested by: Peter T Mount peter@retep.org.uk | |
| |
SELECT n.nspname as "Schema", | |
c.relname as "Name", | |
CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i' THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' END as "Type", | |
TEXT(c.reltuples) as "Info" | |
FROM pg_catalog.pg_class c | |
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace | |
WHERE c.relkind IN ('r','') | |
AND n.nspname <> 'pg_catalog' | |
AND n.nspname <> 'information_schema' | |
AND n.nspname !~ '^pg_toast' |
postgres=# create table t(a integer); create index t_idx on t(a); | |
CREATE TABLE | |
CREATE INDEX | |
postgres=# insert into t select g from generate_series(1,10) g; | |
INSERT 0 10 | |
postgres=# explain analyze select * from t where a > 8; | |
QUERY PLAN | |
------------------------------------------------------------------------------------------- | |
Seq Scan on t (cost=0.00..1.12 rows=2 width=4) (actual time=0.017..0.019 rows=2 loops=1) | |
Filter: (a > 8) |
maciek=# select g as "2", 1.0 / g as "1" from generate_series(1, 3) g order by 2; | |
2 | 1 | |
---+------------------------ | |
3 | 0.33333333333333333333 | |
2 | 0.50000000000000000000 | |
1 | 1.00000000000000000000 | |
(3 rows) | |
maciek=# select g as "2", 1.0 / g as "1" from generate_series(1, 3) g order by "2"; | |
2 | 1 |
Current version (20 iterations of ProbablyPrime
):
$ go test -run none -bench=. -benchtime=60s
PASS
BenchmarkRSA2048Validate 1000 137668985 ns/op
...
Fewer (2) iterations of ProbablyPrime
:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# automagically clone with https://help.github.com/articles/checking-out-pull-requests-locally | |
# since this is only going to work on GitHub anyway, don't make the user specify the full URL | |
usage="Usage: $0 user/repo" | |
path="${1:?$usage}" | |
repo="$(basename "$path")" |
[1] pry(main)> require 'sequel' | |
=> true | |
[2] pry(main)> DB = Sequel.connect('postgres:///maciek') | |
=> #<Sequel::Postgres::Database: "postgres:///maciek"> | |
[3] pry(main)> DB.run <<-EOF | |
[3] pry(main)* CREATE TABLE a(id serial primary key); | |
[3] pry(main)* CREATE TABLE b(id serial primary key, a_id integer); | |
[3] pry(main)* EOF | |
=> nil | |
[4] pry(main)> class A < Sequel::Model(:a) |