Bitcoin Forum
April 26, 2024, 11:16:14 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 [65] 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 ... 197 »
  Print  
Author Topic: [XPM] [ANN] Primecoin Release - First Scientific Computing Cryptocurrency  (Read 687907 times)
n4ru
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
July 10, 2013, 10:53:26 PM
 #1281

Ok, so I'm probably hurting my income, but sharing some hints for optimizations:
A quick'n'dirty profiling run showed that we spend very much time in memory allocations, so I am trying to eliminate some of them.

-did the headerhash mod outlined earlier

-did the time limit on Weave() from Sunny King

-removed some printf's , especially
printf("MineProbablePrimeChain() : new sieve (%u/%u) ready in %uus\n", psieve->GetCandidateCount(), nMaxSieveSize, (unsigned int) (GetTimeMicros() - nStart));
from prime.cpp since it's the only call to the rather expensive GetCandidateCount

-after creating vPrimes array in prime.cpp, store vPrimes.size() in a static variably and replace all calls to it with the variable

-in prime.cpp, PrimeTableGetNextPrime and PrimeTableGetPreviousPrime: Use upper_bound/lower_bound instead of linear search:
// Get next prime number of p
bool PrimeTableGetNextPrime(unsigned int& p)
{
    std::vector<unsigned int>::iterator foundelement=upper_bound(vPrimes.begin(), vPrimes.end(),p);
    if (foundelement!=vPrimes.end()){
        p=*foundelement;
        return true;
    }
    return false;
}

// Get previous prime number of p
bool PrimeTableGetPreviousPrime(unsigned int& p)
{
    std::vector<unsigned int>::iterator foundelement=lower_bound(vPrimes.begin(), vPrimes.end(),p);
    if (foundelement!=vPrimes.end()){
        p=*--foundelement;
        return true;
    }
    return false;
}

- in prime.cpp, CSieveOfEratosthenes::Weave() :
Split the for loop into two for loops, one going up to nChainLength, the other one going up to 2*nChainLength
Thus, you can safe the first first if+for clause in the first loop and leave away the if, and leave the if+for completely away in the second loop.
Also,
if (((nBiTwinSeq & 1u) == 0))
...
if (((nBiTwinSeq & 1u) == 1u))

can be substituted by

if (((nBiTwinSeq & 1u) == 0))
....
else
.....


-prime.h: Removed nSieveSize and replaced all occurrences with nMaxSieveSize. Removed nSieveSize from the initializer as it's become obsolete.

-prime.h: Changed
<     std::vector<bool> vfCompositeCunningham1;
<     std::vector<bool> vfCompositeCunningham2;
<     std::vector<bool> vfCompositeBiTwin;
---
>     bool vfCompositeCunningham1[1000000];
>     bool vfCompositeCunningham2[1000000];
>     bool vfCompositeBiTwin[1000000];
Thus, we should save on quite a few mallocs.




-prime.h: Removed nSieveSize and replaced all occurrences with nMaxSieveSize. Removed nSieveSize from the initializer as it's become obsolete.

-prime.h: Changed
<     std::vector<bool> vfCompositeCunningham1;
<     std::vector<bool> vfCompositeCunningham2;
<     std::vector<bool> vfCompositeBiTwin;
---
>     bool vfCompositeCunningham1[1000000];
>     bool vfCompositeCunningham2[1000000];
>     bool vfCompositeBiTwin[1000000];
Thus, we should save on quite a few mallocs.

Don't forget to initialize the array by adding the following below in place of the other initialization

Code:
        for (int i = 0; i<1000000; ++i){
            vfCompositeCunningham1[i] = false;
            vfCompositeCunningham2[i] = false;
            vfCompositeBiTwin[i] = false;
        }
I think it'd be ideal to use a 2D array with the three composite values stored sequentially in memory as single bits each

Probably should be a std::bitset datatype too

+1

Or somebody could not be a greedy dick!  And at least show the noob that wants to attempt to help out ur network with more miners which files to add all this too.. or code to replace this with.. any explanation to a non coder how to implement..     Or hopefully I have found a dev in this community that is willing to have a young grasshopper!!!  Smiley      to the greedy people!?  killurselves

sry to be an ass but some of you coders are shitting on my big smile i had when i woke up today!   and to think the people I am talking about... I have randomly spoken very positive about in different place in the coin community!  psh!
The amount of entitlement in this thread is too damn high!
1714173374
Hero Member
*
Offline Offline

Posts: 1714173374

View Profile Personal Message (Offline)

Ignore
1714173374
Reply with quote  #2

1714173374
Report to moderator
1714173374
Hero Member
*
Offline Offline

Posts: 1714173374

View Profile Personal Message (Offline)

Ignore
1714173374
Reply with quote  #2

1714173374
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714173374
Hero Member
*
Offline Offline

Posts: 1714173374

View Profile Personal Message (Offline)

Ignore
1714173374
Reply with quote  #2

1714173374
Report to moderator
1714173374
Hero Member
*
Offline Offline

Posts: 1714173374

View Profile Personal Message (Offline)

Ignore
1714173374
Reply with quote  #2

1714173374
Report to moderator
LazyOtto
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
July 10, 2013, 10:53:38 PM
 #1282

[a rant]

Or maybe you could quit bitching about it? If you're not technically inclined, you can't be on the bleeding edge.
I merely placed him on ignore.

I have no patience for those who feel entitled to the fruits of others' labor.
Mike270
Full Member
***
Offline Offline

Activity: 158
Merit: 100


View Profile
July 10, 2013, 10:58:49 PM
 #1283

And if shinkicker's still awake he may provide a compiled windows client :-)

Just about Smiley

When Sunny commits his code to the repo, I will build another (if I am still awake).

Or you could pastebin your file and we could try that? Is this prime or main.cpp?
I'd feel better waiting for his official commit in case he still adopts it in some way (he knows the code better than me) since we have to assume that a larger group of people will download & use it.
But if you're impatient :-) , I outlined it in https://bitcointalk.org/index.php?topic=253662.msg2701731#msg2701731 . It's prime.cpp.

Kind regards
Mike
Mike270
Full Member
***
Offline Offline

Activity: 158
Merit: 100


View Profile
July 10, 2013, 11:03:48 PM
 #1284

WAIT!
There just was an update to the repository!
He also did some more updates, like making some mining printf's configurable, it seems.
96redformula
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
July 10, 2013, 11:06:19 PM
 #1285

Why is it that we finally get an updated binary and then we get even more changes immediately after ? Sad
Mike270
Full Member
***
Offline Offline

Activity: 158
Merit: 100


View Profile
July 10, 2013, 11:09:51 PM
 #1286

Why is it that we finally get an updated binary and then we get even more changes immediately after ? Sad

Just happened to be that way....
neverhappy...
nmersulypnem
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 10, 2013, 11:13:26 PM
 #1287

Is there a way to package Qt and MingGw in the windows binary? I hate to have to install these on every PC...
Hydroponica
Full Member
***
Offline Offline

Activity: 182
Merit: 100


fml


View Profile
July 10, 2013, 11:14:20 PM
 #1288

Why is so much info about PrimeCoin hidden? Can't see network hash, can't see current difficulty...Unless I'm missing something Huh

Eli0t
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
July 10, 2013, 11:15:38 PM
 #1289

getdifficulty

7.62721026

but yeah cant see network PPS

LTC:  LKpJf3uk7KsHU73kxq8iFJrP1AAKN7Yni7  DGC:  DKXGvEbj3Rwgrm2QQbRyNPDDZDYoq4Y44d  XPM:  AWV5AKfLFyoBaMjg9C77rGUBhuFxz5DGGL
eule
Hero Member
*****
Offline Offline

Activity: 756
Merit: 501


View Profile
July 10, 2013, 11:16:54 PM
 #1290

Quote
Primecoin: Add gensieveroundlimitms config parameter
Can someone tell me what this mysterious new command might do?  Cheesy

drummerjdb666
Full Member
***
Offline Offline

Activity: 244
Merit: 101



View Profile
July 10, 2013, 11:21:56 PM
 #1291

The amount of entitlement in this thread is too damn high!
Yup. And the bullshit like "I'm sure they banned EC2! Or it wouldn't be 'fair'!".

Why is it that we finally get an updated binary and then we get even more changes immediately after ? Sad
Stop being a nooby noob and learn to compile your software like real men do, instead of blindly accepting binaries from unknown users.

i'm trying to learn.. but have random questions.. and am told i'm entitled because of it..

don't ever shoot me down for trying to learn something.. i'll do bad things to ur mom and her little dog too
poiuytr4
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
July 10, 2013, 11:22:45 PM
 #1292

Thanks SunnyKing. You have made crypto currencies a lot more interesting. Most of these posts are about how to optimise the client but the fundamentals are to do with prime numbers and number theory and hopefully the real benefit of your coin will be more interest in these areas. I like this stuff but I've already learnt more from looking at the ideas behind your currency.
 I am sure that there are real number theory experts that have a lot of expertise in generating and analysing primes who have probably haven't heard of prime coin yet. Instead of doing strange abstract pure mathematics for no reason  Smiley they could now do it to generate a strange virtual currency.

 I think that there will a whole generation of ways of improving and optimising your client and block generation speeds but I think this will be closer to mathematical research than speeding up hashing. One of the things I don't understand is why the verification techniques are not a more optimal method to generate the chains?
 I also am slightly concerned that the integral of the difficulty factor will not change very often and so the difficulty factor will be dependent on the remainder of the Fermat test which is not very well explained and apparently not linear. This might make the difficulty levels a bit wobbly but none of this will necessarily be a major problem.
 I'm looking forward to following the progress of prime coin. Good luck.  Smiley
dudeguy
Member
**
Offline Offline

Activity: 182
Merit: 10



View Profile
July 10, 2013, 11:32:11 PM
 #1293

The amount of entitlement in this thread is too damn high!
Yup. And the bullshit like "I'm sure they banned EC2! Or it wouldn't be 'fair'!".

Why is it that we finally get an updated binary and then we get even more changes immediately after ? Sad
Stop being a nooby noob and learn to compile your software like real men do, instead of blindly accepting binaries from unknown users.

i'm trying to learn.. but have random questions.. and am told i'm entitled because of it..

don't ever shoot me down for trying to learn something.. i'll do bad things to ur mom and her little dog too

We're not shooting you down for trying to learn something. We're shooting you down because you aren't using Google to answer your questions and are therefore wasting our fucking time. You're also acting like a five year old.

Somebody smart just put it very simply. I'm going to leave it at this and chose not not agree or disagree with the quote but be somewhere in between.



"There's nothing to be proud of if you are stealing blocks. Sure love the free market and talk about it all day, but when it comes to committing crypto-suicide, short of a 51% attack, exploiting mining software for individual benefit is just about as effective as it comes."
nmersulypnem
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 10, 2013, 11:33:57 PM
 #1294

Is anyone else getting an internal compile error on the new main.cpp?
drummerjdb666
Full Member
***
Offline Offline

Activity: 244
Merit: 101



View Profile
July 10, 2013, 11:35:20 PM
 #1295

I am using google..  I live inside of the matrix usually!    although this post is where the majority of the info on this subject is..  

I was trying to ask which of the files those edits need to be made to..    Even if I have to get all troll and turn into a 5yr old for a bit.. I will get my questions answered.. just maybe not publicly in this thread...    I like when people throw gas on my fire's though!    It makes me smile!   Not hard to get most people all butt hurt.. which apparently happened a bit ago.. very amusing.. i respond like a dick style troll and move on!

 Roll Eyes Roll Eyes
LazyOtto
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
July 10, 2013, 11:38:11 PM
 #1296

Is anyone else getting an internal compile error on the new main.cpp?
I just did a "git pull" to update the code on local repository.

Then it compiled OK.

Did spit out a rather nasty sounding warning to the effect of "you really oughta put a semicolon here". But just a warning, not an error.

I'm currently running it on OS X.

-- edit - replaced "error" where I meant to say "warning"
LazyOtto
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
July 10, 2013, 11:41:29 PM
 #1297

Is anyone else getting an internal compile error on the new main.cpp?
Did you mean the compiler itself generated an internal error on you?

I remember the days when I used to use Visual Studio.  Wink
Zalfrin
Sr. Member
****
Offline Offline

Activity: 401
Merit: 250



View Profile
July 10, 2013, 11:55:44 PM
 #1298

Here is my qt compiled on an i5 under windows 7 with the latest updates from Sunny. As the previous guy who posted a qt said, do your due diligence before using this... encrypt wallet, run thru virus scan, etc.

https://www.dropbox.com/s/zz2m6sx84rd7rr8/release.zip

If you found this helpful and feel so inclined, you can send donations to

ANYwjHw5iDq3FrN3z5JfMsPqZptgoD94pa for primecoin
or
1NrbAL9G6Lc3DEYdrbzwCrrJMKxMXqkHB for bitcoin
Zalfrin
Sr. Member
****
Offline Offline

Activity: 401
Merit: 250



View Profile
July 11, 2013, 01:10:45 AM
 #1299


Doesn't work, needs libgcc DLL.
[/quote]

Sorry about that, I will recompile with static.
nmersulypnem
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 11, 2013, 01:18:29 AM
 #1300


Sorry about that, I will recompile with static.
[/quote]
Actually,  I'm having that problem as well - how do you compile embedding the DLLs?
Pages: « 1 ... 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 [65] 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 ... 197 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!