473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Sieve of Zakiya

Update: 2008/11/03

Architecture & coding improvements. Renamed generators.

I am 90% finished writing up a mathematical analysis of my method.
In the process I found an architectural optimization to the sieve
process which is incorporated in the new code. Complexity analysis
showing other interesting stuff for each generator.

When I finish I will post paper here with the code:

http://www.4shared.com/account/dir/7...bd7b71/sharing

Jabari
Nov 4 '08 #1
4 2704
On Nov 4, 4:12*pm, jzakiya <jzak...@mail.comwrote:
Update: 2008/11/03

Architecture & coding improvements. Renamed generators.

I am 90% finished writing up a mathematical analysis of my method.
In the process I found an architectural optimization to the sieve
process which is incorporated in the new code. Complexity analysis
showing other interesting stuff for each generator.

When I finish I will post paper here with the code:

http://www.4shared.com/account/dir/7...bd7b71/sharing

Jabari
Another update to SoZ code.

Fixed coding "oversight" which caused the SoZ code running under psyco
to be slower than SoA, though SoZ was faster than SoA without psyco.
Now SoZ is consistently faster by an appreciable amount either way.

Some other coding enhancements to optimize algorithmic performance.

Enjoy! :-)

Jabari
Nov 18 '08 #2
On Nov 18, 7:53*am, jzakiya <jzak...@mail.comwrote:
http://www.4shared.com/account/dir/7...bd7b71/sharing
From the introduction to the paper:

"Thus began a process that culminated in my developing a new class
of Number Theory Sieves (NTS) to generate prime numbers, and test
primality of numbers, that use minimum memory, are simple to code,
and are much faster than all previously known methods."

That's quite a claim! You might consider toning this down
a little if you want to be taken seriously. :-)

How does your prime-generating algorithm stack up against
Bernstein's primegen package?

http://cr.yp.to/primegen.html

Mark

Nov 18 '08 #3
On Nov 18, 5:01*am, Mark Dickinson <dicki...@gmail.comwrote:
On Nov 18, 7:53*am, jzakiya <jzak...@mail.comwrote:
http://www.4shared.com/account/dir/7...bd7b71/sharing

From the introduction to the paper:

"Thus began a process that culminated in my developing a new class
of Number Theory Sieves (NTS) to generate prime numbers, and test
primality of numbers, that use minimum memory, are simple to code,
and are much faster than all previously known methods."

That's quite a claim! *You might consider toning this down
a little if you want to be taken seriously. *:-)

How does your prime-generating algorithm stack up against
Bernstein's primegen package?

http://cr.yp.to/primegen.html

Mark
Hi Mark,

Someone has done a multi-core C implementation (for AMD-X2 and Intel
quad and 8-core systems using Intel and GCC compilers) and the SoZ
prime generators are faster than the Sieve of Atkin (SoA) and Sieve of
Eratosthenes (SoE).

I think(?) he tried to run Bernstein's primegen, but its old code
written before multi-core and widely used 64-bit systems, so he wrote
his own multi-core/threaded version for his systems. The SoZs again,
are faster.

I've implemented the SoZ generators in Forth, Ruby, and Python, and
all show the same results, to be faster than the SoA and SoE in those
languages, along with C.

Now that I've corrected the Python code (I am NOT a native Python
programmer) it now beats the SoA implementation included in the code
using psyco too (for 2.4.3, I don't have it for other versions).

Run the code and see for yourself! :-)

I am writing another paper explaining some of the mathematical basis
for the SoZ, with complexity analysis, but I keep finding
"interesting" features about the underlying math, which I hope real
mathematicians will investigate and reveal what's going on here.
I want to release at least a first version before December.

But the proof is in the pudding, and the results speak for themselves.
It's an amazingly simple algorithm, so tear it apart.

Jabari
Nov 18 '08 #4
On Nov 19, 5:16*am, jzakiya <jzak...@mail.comwrote:
[Lots of stuff snipped]
My SoZ mathematical analysis shows why its algorithmically faster than
both the SoA & SoE, to explain its demonstrated computational
superiority. Again, hopefully professional mathematicians will become
interested in some of the features and characteristics I've found in
the method's elements, and do a better and more thorough analysis of
what's going on than I'm able to do presently.
This is getting off-topic for comp.lang.python. I suggest you
take it to sci.math.

Mark
Nov 19 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: MSiegel | last post by:
hi there! i have to program the sieve of eratosthenes in php as a homework. after i had created an html file where the maximum is set i wrote a php script which doesn't work properly - actually...
0
by: Mark A. Washburn | last post by:
/* SIEVE OF ERATOSTHENES from BYTE magazine -------------------- -- compiled with jdk 1.1.7b with optimize on ( -O) -- Run times on 300 MHz Pentium 2 Windows 95 -- in order of output, from...
15
by: Steve Bergman | last post by:
Just wanted to report a delightful little surprise while experimenting with psyco. The program below performs astonoshingly well with psyco. It finds all the prime numbers < 10,000,000 ...
4
by: knuxus | last post by:
Hey everyone.... I would appreciate any type of help if anyone could explain me how to translate this algorithm to Visual Basic, im still learning and i would appreciate this algorithm to my prime...
2
Blackout
by: Blackout | last post by:
Hi, I'm having problems with this C program. Whenever I run it, it doesn't print anything. The program is supposed to compute and display all the prime numbers from 1 - 300 using the sieve of...
5
by: jzakiya | last post by:
This is to announce the release of my paper "Ultimate Prime Sieve -- Sieve of Zakiiya (SoZ)" in which I show and explain the development of a class of Number Theory Sieves to generate prime...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.