Thread: Pari/GP to PFGW
View Single Post
Old 2017-12-21, 00:58   #3
CRGreathouse's Avatar
Aug 2006

10111011000012 Posts

PFGW is definitely faster, but the comparison is not a fair one: it's just doing a 3-PRP test, while gp is doing a full BPSW test (~3x slower). A better comparison would be to use ispseudoprime(..., 1) which will perform 1 Miller-Rabin test with a random base.

I call PFGW within gp like so:
	my(prog="~/mth/pfgw/pfgw64 -k -N -u0 -q");
	Vecsmall(externstr(Str(prog, n)));
and you may also find the extern and system commands useful.
CRGreathouse is offline   Reply With Quote