- 注册时间
- 2007-12-26
- 最后登录
- 1970-1-1
- 威望
- 星
- 金币
- 枚
- 贡献
- 分
- 经验
- 点
- 鲜花
- 朵
- 魅力
- 点
- 上传
- 次
- 下载
- 次
- 积分
- 539
- 在线时间
- 小时
|
发表于 2012-3-11 10:36:37
|
显示全部楼层
1# 无心人
我的筛法经过优化,需找最大素数间隔每秒能达到10^9, 离楼主目标10万亿(10^12)/s 差距甚远
C:\Windows\system32\cmd.exe /c PrimeNumber62
--------------------------------------------------------------------
Count/Sieve number of primes in (0, 1E19 + 1E13), version 1.8
Implemented by the segmented sieve of eratosthenes [wheel = 30/210]
Copyright @ by Huang Yuanbing 2011 - 2012 bailuzhou@163.com
--------------------------------------------------------------------
--------------------------------------------------------------------
Compiled by Mingw/g++ 4.6.3 on 10:50:33 Mar 11 2012
Cpu arch = x86, cores = 4, SSE4_Popcnt = 0
Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, L2 cache = 256 kB
--------------------------------------------------------------------
[MARCO] : ASM_X86 = 0, LIANGBCH = 1
[MARCO] : SIEVE_SIZE = 1024k, BLOCK_SIZE = 32k, PDIFF = 255
--------------------------------------------------------------------
--------------------------------------------------------------------
-------------------start count primes -------------------
Prime[50847538] = 1000000033, save primes gap use 0.326 sec
init bucket list time use 1.528 sec and sieve size = 1024 k
PI[1e18, 1e18+1e9] = 24127085, time use 1.427 sec
-------------------start find max gap -------------------
init bucket list time use 1.513 sec and sieve size = 1024 k
time use 1.442 sec, maxp prime gap = 744 on 1000000000696148003
[command or number] : y 1 e10
-------------------start find max gap -------------------
time use 3.417 sec, maxp prime gap = 354 on 4302407359
[command or number] : y 1e16 1e10
-------------------start find max gap -------------------
init bucket list time use 0.182 sec and sieve size = 1024 k
time use 12.062 sec, maxp prime gap = 648 on 10000004892952351
[command or number] : |
|