News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Prime numbers

Started by jj2007, August 12, 2015, 07:19:26 AM

Previous topic - Next topic

jj2007

Just for fun :biggrin:

Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
It took 29.16 seconds to find 98222287 primes among 2000000000 numbers
2       3       5       7       11      13      17      19      23      29      31      37      41      43      47      53      59      61      67
71      73      79      83      89      97      101     103     107     109     113     127     131     137     139     149     151     157     163
167     173     179     181     191     193     197     199     211     223     227     229     233     239     241     251     257     263     269
271     277     281     283     293     307     311     313     317     331     337     347     349     353     359     367     373     379     383
389     397     401     409     419     421     431     433     439     443     449     457     461     463     467     479     487     491     499

...
1999999553      1999999559      1999999571      1999999609      1999999613      1999999621      1999999643      1999999649      1999999657      199999
9747    1999999763      1999999777      1999999811      1999999817      1999999829      1999999853      1999999861      1999999871      1999999873
1999999913      1999999927      1999999943      1999999973

rrr314159

I am NaN ;)

jj2007

It's waiting for your fast 64-bit version :biggrin:

rrr314159

I have a 32-bit version somewhere which took a few seconds, but was outclassed by others mentioned on the net. Of course multiple threads helps

I have a question about Italy, might as well ask it now. Long ago Italy produced men like Caesar, the Cato's, Pompey, Brutus, Octavius Augustus .. and Horace, Virgil, Tacitus .. Marcus Aurelius ..: a long list of great men. More recently we have Dante Alighieri, Leonardo da Vinci, Enrico Fermi and other great geniuses. But since  1945 or so, nothing! Well there's jj2007, but that's about it. The question is, what the h**l went wrong??

I am NaN ;)

dedndave

Jochen is from Germany   :biggrin:

jj2007

Fellini, Pasolini, Abbado, Gucci, Armani, Ferrari, Maserati, Lamborghini, ... ;-)

rrr314159

Quote from: jjFellini, Pasolini, Abbado, Gucci, Armani, Ferrari, Maserati, Lamborghini, ... ;-)

- Right: like I said, since 1945 or so, a bunch of nobodies! Imagine telling Caesar, after he's spent the day slaughtering thousands of Germans and half the Senate, and while taking a quick break is deciding the fate of the entire known world: "We still have great men in Italy! For instance here's a guy Armani who designs clothes. Take off that blood-stained armor and try on this little number - you'll look so cute, darling!" He'd chop your head off and feed it to the dogs in the street.

What went wrong??
I am NaN ;)

jj2007

If King Richard III shouted "My kingdom for a horse", what do you think Caesar would have offered for a Lamborghini???

rrr314159

Caesar would respect Henry Ford, or other great inventors, but not a mere mechanic. He'd put Lamborghini to work repairing cart axles and cleaning up after the horses. A car would be useless: where would he get gasoline, oil, brake fluid, tires, spare parts? At least, he'd prefer something very rugged and reliable - Lamborghini's break down constantly. Maybe a Lamborghini tractor would do, but no doubt he'd want something Japanese or Korean-made.

Anyway, anybody these days can have a car; me, you, Lamborghini are all way ahead of Caesar in that regard. But I'm talking about the quality of the man, not his toys.

What the h**l went wrong ??
I am NaN ;)

dedndave


hutch--

you forgot Monica Bellucci, a national treasure.


xanatose

Quote from: rrr314159 on August 12, 2015, 12:19:45 PM
What the h**l went wrong ??

People got domesticated and complacent. And "leaders" got to rage war without putting their own skin on the line. That's what went wrong.

The same question could be asked for the Greeks. Is like they have chosen the worst traits of Athenians and Spartans instead of the best traits.

rrr314159

#12
@dedndave and hutch,

Enzo Ferrari was somebody, can't deny that, but his glory days of skill and bravery were all before 1945 (the year I specified, as u remember). After that he was a mere businessman, who managed to win a few races, while killing seven of his drivers and numerous spectators. His dictatorial disregard of other's lives would, actually, be the only quality to win Caesar's respect ...

Likewise, I can't deny Monica Bellucci is somebody! Caesar would definitely have respected her and appointed her to a very important position. In fact, the entire army would have respected her - one after the other.

Come to think of it, the women have, indeed, improved since ancient days. There are extant pictures of Caesar's great passion, Cleopatra: if that's the best they had ... well, I'd hate to see the worst. More recently, look at paintings such as Mona Lisa. Ms. Bellucci is a huge improvement. Then there's Sophia Loren, and Gina Lollobridgida, and a million young ones I've never heard of. No doubt, the quality of the women is way up.

But, I'm talking about the quality of the men.

What went wrong ??
I am NaN ;)

rrr314159

xanatose,

you must be a lot of fun at parties! ... I'm just trash-talking, don't really expect an answer. You're right, there are reasons why Italy is so much less than it was; but those same reasons apply to every country. The modern era is real tough on heroes. Italy is a good subject, not because its current crop is worse than anyone else's, but because its surpassing greatness in the past makes such a contrast.

For instance it wouldn't be funny to pick on Poland: the list of notables is a joke in itself, all it needs is the laugh track. Pilsudski? Boleslaw the Brave? Żeromski? Tarski? General Beck, who charged tanks with cavalry? Say "Chopin" - that's it, you're done with great Poles (well, Ulam perhaps also).

Quote from: xanatoseIs like they [Greeks] have chosen the worst traits of Athenians and Spartans instead of the best traits.

- indeed the same thought has occurred to me
I am NaN ;)

rrr314159

Quote from: jj2007Just for fun :biggrin: ... It took 29.16 seconds to find 98222287 primes among 2000000000 numbers

- Actually this is an interesting topic, perhaps the time has come for a 64-bit SIMD multi-threaded prime number generator. Sorry, I accidentally hijacked the thread to complain about Italy. My excuse, I noticed "Just for fun" and, without checking, thought we were in the SoapBox or Colosseum. Like to know how fast the current champion PM generator is, can't seem to find it on net. Undoubtedly beatable, assuming it's not assembler. ... some fast techniques would be very SIMD-izable, for instance "wheeling". And of course cache management is vital
I am NaN ;)