Bitcoin Forum
August 03, 2021, 12:03:50 AM *
News: Latest Bitcoin Core release: 0.21.1 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 16 »
201  Bitcoin / Hardware / Will Avalon work at 110F = 43 Celsius without air conditioing? on: January 31, 2013, 12:38:21 PM
Will Avalon work at 110F = 43 Celsius without air conditioning?
202  Bitcoin / Hardware / Re: [Avalon ASIC] Batch #2 pre-Sale Thread on: January 31, 2013, 04:27:11 AM
which will probably last 5-10mins now that we have proof...unless avalon's site crashes from all the traffic lol

5-10 min is optimistic, Chinese customers have 50 millisecond advantage however, thanks to Mr. Einstein
203  Bitcoin / Hardware / Re: [Avalon ASIC] Batch #2 pre-Sale Thread on: January 31, 2013, 04:07:22 AM
I want to order, but it's hot where I live (105-110F outside = 43 Celsius), will Avalon work without AC?
204  Bitcoin / Bitcoin Discussion / Re: Win 10 BTC: Guess the price on February 1st (no entry fee) on: January 29, 2013, 02:25:12 AM
18.77
205  Other / Off-topic / Re: I really don't know what to make of programming anymore on: January 27, 2013, 09:07:55 PM
I think C language is a big systematic hack and C++ is a hack around the hack.

C language was created 40 years ago. As an alternative to assembly language and fortran, it wasn't at all bad. It's amazing how far hardware has progressed since then, but how little software technology has changed. Still C is the most popular language out there.
206  Bitcoin / Hardware / Re: [Announcement] Avalon ASIC Ships on: January 27, 2013, 08:54:15 PM
Where is that "moped" part coming from? ngzhang has posted that he drives CIVIC (I presume Honda) and posted the over-the-dashboard shots of the traffic jam in Beijing.

The moped part is clear to anyone living in a big city like Beijing, let me guess you are from Idaho and drive F150?
207  Bitcoin / Hardware / Re: "Avalon" ASIC, announcement & pre-order. pre-order over. project started. on: January 22, 2013, 03:05:58 AM
I believe Intel and AMD pay somewhere around 90,000

I don't think Intel pays anyone to make the chips
208  Bitcoin / Hardware / Second batch on: January 21, 2013, 01:32:41 PM
Looks like there will be significant over-subscription for the second batch. How will you handle it? Some lottery or auction scheme maybe?
209  Bitcoin / Project Development / Re: Probably the hottest business idea of the moment in BTC on: December 14, 2012, 03:10:41 AM
Patently idiotic idea. Do you think Microsoft or Google lack funds or desire to create software without bugs? They still ship products full of bugs, because it is mathematically impossible to prove correctness of a program. That's because the space of all possible inputs is exponentially large and you can't test them all.
Testing is an art, not a science.
210  Other / Politics & Society / Re: Georgism/Geoism and the Land Value Tax on: December 12, 2012, 02:23:34 AM
Let me guess: myrkul is a homeowner, Topazan rents. Geoism will never succeed because most people own their homes.
211  Economy / Economics / Re: What would happen if everyone got 1000 USD every month? on: December 09, 2012, 06:46:49 PM
Many people would take $1000 and quit their jobs, maybe most people
212  Bitcoin / Hardware wallets / Re: [BOUNTY] 1BTC for hardware wallet name on: December 09, 2012, 06:33:29 PM
SlushStash
213  Economy / Games and rounds / Re: 10 BTC 4 U 2 STEAL - Protected by a weak 5-letter password - crack & it's yours! on: December 04, 2012, 02:36:03 AM
So what's the lesson? 5 letter passwords are crackable within a day by any sysadmin. 7 letters are probably crackable within a day by a botnet. 8 and more are impossible to memorize. Passwords in general, can't be considered secure anymore.
214  Economy / Games and rounds / Re: 10 BTC 4 U 2 STEAL - Protected by a weak 5-letter password - crack & it's yours! on: December 03, 2012, 04:03:45 AM
I can only tell you that Amazon Extra-Large High-CPU instances are a rip off!
Not faster than a $500 home computer.
And that password is not in a dictionary.
215  Bitcoin / Mining / Re: Who is quitting mining due to block halving? on: December 02, 2012, 05:12:04 PM
at the end of the day btc will be the determinator for mining profitability unless some other alt chain grows substantially in its influence.
And explain to me why we need an alt-coin? What's wrong with just simply mining BTC and be happy with that?

Because half of all bitcoins have been already mined by early adopters. Now alt chain is a new opportunity to be an early adopter.
216  Economy / Games and rounds / Re: 10 BTC 4 U 2 STEAL - Protected by a weak 5-letter password - crack & it's yours! on: December 02, 2012, 04:16:15 PM

Is this really the bottleneck?  I'd have figured that there would be a performance penalty stemming from all the allocation of objects on the heap and have never dug into the inner workings of scrypt this far.  Although I have worked with assembly quite a bit, I have never done so in the context of C#, and have assumed that the JIT compiler does a pretty good job of being efficient at the instruction level other than incurring a ton of overhead moving in and out of objects it so cautiously allocates.

How did you arrive at the above?  If I try to look for the same piece of code in my app, I get this:

Looks to me like it's going about it a much longer way than what you've quoted.  Are we looking at the same implementation?  (the code you've quoted isn't even something I could find verbatim in the implementation I used).  All of these instructions look like they are accomplishing nothing more than checking that the array references are in bounds, and the code you're quoting doesn't reference an array.  In fact it is checking very redundantly in spite of obvious possible optimizations (e.g. checking to see that x[0] is a in bounds immediately after having verified that x[4] is).  And it doesn't unroll the call to R(), something I wouldn't have expected anyway.

EDIT: not surprisingly, I get substantially better performance compiling this as a "release" build and then not running it under the debugger, the scrypt operation taking closer to 1 second versus 3 seconds without changing a single line of code, even though the release build still shows all the wasteful bounds checks if I look at the disassembly.

You are right about the boundary checks. They can be avoided with unsafe pointers though. Also, C# doesn't do inlines well.
So I hand-optimized the inner loop:
Code:
               int i;
                uint x0 = input[0+ inputOffset];
                uint x1 = input[1 + inputOffset];
                uint x2 = input[2 + inputOffset];
                uint x3 = input[3 + inputOffset];
                uint x4 = input[4 + inputOffset];
                uint x5 = input[5 + inputOffset];
                uint x6 = input[6 + inputOffset];
                uint x7 = input[7 + inputOffset];
                uint x8 = input[8 + inputOffset];
                uint x9 = input[9 + inputOffset];
                uint x10 = input[10 + inputOffset];
                uint x11 = input[11 + inputOffset];
                uint x12 = input[12 + inputOffset];
                uint x13 = input[13 + inputOffset];
                uint x14 = input[14 + inputOffset];
                uint x15 = input[15 + inputOffset];

                for (i = rounds; i > 0; i -= 2)
                {

                    x4 ^= R(x0 + x12, 7); x8 ^= R(x4 + x0, 9);
                    x12 ^= R(x8 + x4, 13); x0 ^= R(x12 + x8, 18);
                    x9 ^= R(x5 + x1, 7); x13 ^= R(x9 + x5, 9);
                    x1 ^= R(x13 + x9, 13); x5 ^= R(x1 + x13, 18);
                    x14 ^= R(x10 + x6, 7); x2 ^= R(x14 + x10, 9);
                    x6 ^= R(x2 + x14, 13); x10 ^= R(x6 + x2, 18);
                    x3 ^= R(x15 + x11, 7); x7 ^= R(x3 + x15, 9);
                    x11 ^= R(x7 + x3, 13); x15 ^= R(x11 + x7, 18);
                    x1 ^= R(x0 + x3, 7); x2 ^= R(x1 + x0, 9);
                    x3 ^= R(x2 + x1, 13); x0 ^= R(x3 + x2, 18);
                    x6 ^= R(x5 + x4, 7); x7 ^= R(x6 + x5, 9);
                    x4 ^= R(x7 + x6, 13); x5 ^= R(x4 + x7, 18);
                    x11 ^= R(x10 + x9, 7); x8 ^= R(x11 + x10, 9);
                    x9 ^= R(x8 + x11, 13); x10 ^= R(x9 + x8, 18);
                    x12 ^= R(x15 + x14, 7); x13 ^= R(x12 + x15, 9);
                    x14 ^= R(x13 + x12, 13); x15 ^= R(x14 + x13, 18);
                }
                output[0 + outputOffset] = x0 + input[0 + inputOffset];
                output[1 + outputOffset] = x1 + input[1 + inputOffset];
                output[2 + outputOffset] = x2 + input[2 + inputOffset];
                output[3 + outputOffset] = x3 + input[3 + inputOffset];
                output[4 + outputOffset] = x4 + input[4 + inputOffset];
                output[5 + outputOffset] = x5 + input[5 + inputOffset];
                output[6 + outputOffset] = x6 + input[6 + inputOffset];
                output[7 + outputOffset] = x7 + input[7 + inputOffset];
                output[8 + outputOffset] = x8 + input[8 + inputOffset];
                output[9 + outputOffset] = x9 + input[9 + inputOffset];
                output[10 + outputOffset] = x10 + input[10 + inputOffset];
                output[11 + outputOffset] = x11 + input[11 + inputOffset];
                output[12 + outputOffset] = x12 + input[12 + inputOffset];
                output[13 + outputOffset] = x13 + input[13 + inputOffset];
                output[14 + outputOffset] = x14 + input[14 + inputOffset];
                output[15 + outputOffset] = x15 + input[15 + inputOffset];

EDIT: Oops, got it wrong the first time, corrected. Inlining doesn't get you much. Still, x2 faster than original implementation.
217  Economy / Games and rounds / Re: 10 BTC 4 U 2 STEAL - Protected by a weak 5-letter password - crack & it's yours! on: December 02, 2012, 09:58:03 AM
It would take 36 years to run on the slow C# crappy implementation of scrypt that I have bundled with my app.  Simply feeding the same input to a more efficient implementation should chop this figure down by orders of magnitude.

C# generates this code for the inner loop:

                    x4 ^= (x0 << 7) | (x12 >> (32 - 7));
000002bc  mov         eax,dword ptr [ebp-28h]
000002bf  shl         eax,7
000002c2  mov         edx,dword ptr [ebp-58h]
000002c5  shr         edx,19h
000002c8  or          eax,edx
000002ca  xor         dword ptr [ebp-38h],eax

I don't think C++ compiler would do any better
218  Economy / Speculation / Re: It's quiet, too quiet. Especially after everyone predicted a major rocket. on: December 01, 2012, 10:41:57 PM
Since when are human reactions and game theory random?

They are based off of  small set of initial conditions and a similar set of possible reacting conditions.  Far from random there are like what 5 starting positions and 5 possible ending positions(Same, better, much better, worse, much worse)?  It is the very definition of NOT random.  It's exactly 25 possible iterations of beginning and ending conditions.

I'm correlating to a specific, similar event from approximately last year to a specific similar event from approximately this coming year.  It's not random, it's SIMILAR.

The fallacy here is that there are numerous other CombustibleLemons who follow the same naive logic.
Then there are CombustibleOranges who try to predict what CombustibleLemons will be doing.
Then there are supercomputers which try to outsmart both oranges and lemons.
Asymptotically, it is completely unpredictable mess = random.
219  Bitcoin / Bitcoin Discussion / Re: Our response to Dmytri Kleiner's misunderstanding of money on: November 10, 2012, 05:34:35 AM
What a pile of nonsense, typical european waffle. Tributes can be paid in many ways besides money - in goats, in military service, in free labor (as in Dmitry's motherland) etc
220  Economy / Lending / Re: WTF is up with all these broke dicks requesting loans? on: October 30, 2012, 05:34:19 AM
Seriously, a loan for $10?  Or $40? 

Isn't it a price of a dose?
Pages: « 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 16 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!