You are here:
  • Decrease font size
  • Default font size
  • Increase font size
FireBoard
Welcome, Guest
Please Login or Register.    Lost Password?
nt factor FASTER primes (was: Re: Code and Perf. Data for Prime Finders (was: Genuine Eratosthenes sieve)) (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: nt factor FASTER primes (was: Re: Code and Perf. Data for Prime Finders (was: Genuine Eratosthenes sieve))
#7898
Will Ness (Visitor)
Click here to see the profile of this user
Birthdate:
nt factor FASTER primes (was: Re: Code and Perf. Data for Prime Finders (was: Genuine Eratosthenes sieve))  
Daniel Fischer <daniel.is.fischer <at web.de writes: But there's a lot of list constructuion and deconstruction necessary for the Euler sieve. yes. Unless, of course, s smart compiler recognizes there's only one consumer for the values each multiples-list is producing, and keeps it stripped down to a generator function, and its current value. I keep thinkig a smart compiler could eliminate all these span calls and replace them with just some pointers manipulating... Of course I'm no smart compiler, but I don't see how it could be even possible to replace the span calls with pointer manipulation when dealing with lazily generated (infinite, if we're really mean) lists. Even when you're dealing only with strict finite lists, it's not trivial to do efficiently. I keep thinking that storage duplication with span, filter etc. is not really necessary, and can be replaced with some pointer chasing - especially when there's only one consumer present for the generated values. What I mean is thinking of lists in terms of produce/consumer paradigm, as _object_s supporting the { pull, peek } interface, keeping the generator inside that would produce the next value on 'pull' request and keep it ready for any 'peek's. Euler's sieve is  sieve (ps) xs = h ++ sieve ps (t `minus` map (p*) [p,p+2..])                       where (h,t) = span (< p*p) xs Everything lives only through access, so (sieve (tail primes) [5,7]) would create an _object_ with the generator which has the 'span' logic inlined:  sieve ps xs = make producer such that      p := pull ps
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
 

Who's Online

We have 46 guests online

Short News

The sea at all help

For several years, a hit in European resorts is a thalasso therapy. This medical treatments and cosmetic advantages of using sea water, salt and algae. Sea beauty salon you can arrange in the bathroom. Put the bath bag of sea salt and immerse yourself in it for half an hour .

Treat yourself to a little sunshine

In spite of the fall weather, you can make your skin has a nice, peach color. Such as in summer, for the miss. Most Polish women loves to sunbathe, I really love the bronze. Why? Since even slightly tanned body looks slender and prettier. It makes you improve mood. Aware that you look more attractive, once you added confidence, just feel happier.

Perfect manicure

Each carefully constructed hands adds beauty. Are both fashionable nails in luscious color and adorned with delicate French manicure. Hands are very "eloquent". Reveal the type of work, health and lifestyle. That the hands were well cared for, require regular treatment. Well done manicure not only adorned with nails, but also help solve some problems. Hide uneven or the plate, deflecting attention from the kins. Instead of cosmetic surgery can make themselves at home - at a convenient time for us and much cheaper.

Green spa

We start from a fifteen-minute bath in a bathtub filled with warm milk, yoghurt and honey dissolved in them, then peeling again using an extract of herbs. Sam puts on his feet smell. And yet, we face wraps with honey and massage using selected essential oil.



 
Kapucyni Bytom
Parafia Bytom
Kredyt Konsolidacyjny
Konsolidacja zadłużenia
hotel spa
super glue
klej super glue, w super cenie
stoły warsztatowe
Sklep meblowy