flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Main > Finding max clique size and C++ is better than asm.

Goto page Previous  1, 2, 3, 4  Next
Author
Thread Post new topic Reply to topic
redsock



Joined: 09 Oct 2009
Posts: 265
Location: Australia

Tyler wrote:
...What do you and your friend think? Am I an alright C/C++ guy? I think I'm above average, but I know average ain't so good either. I passed a technical interview on the subject, at least. Razz

Your code is legible, though I am not sure I agree entirely with your logic/flow constructs. Too small a sample and insufficient information to judge your programming skills in general Smile If that code took you 6 months to write, hahah, well, you get the idea.

As for my opinion on the title of this thread regarding whether C++ is better than asm or not, all programming languages are efficiency tradeoffs. Programmer friendly typically comes with lots of efficiency penalties (array bounds checking, arithmetic overflow conditions, the list goes on and on).

I think you should keep your $60 bux and play more with the compiler(s) you use and their own assembly outputs Smile Smile

The discussion I was having earlier was about specific architecture optimisations, and your exercise was a perfect example. In it, g++ with your compiler flags does the following with your adj5 array references:

Code:
        movsxd rdi,edi
        movsxd rsi,esi
        lea    rax,[rdi+rdi*2]
        lea    rax,[rdi+rax*4]
        lea    rax,[rdi+rax*4]
        add    rsi,rax
        mov    eax,DWORD PTR [rsi*4+0x405ce0]
        test   eax,eax
        setne  al
        ret


And the interesting conversation-worthy part of this is that on Ivy Bridge (and the same for many others), despite the native choice, g++ thinks that the very long dependency chain there is better than a multiply instruction. After a quick look in Agner Fog's instruction tables, a mul is clearly a better choice here.

Further to that, the movsxds are there because your HLL constructs force it to assume that the values can be negative (signed integers versus otherwise).

To sum that all up in a nutshell: your position that "C++ is better" on an performance level is patently false. That being said, it is possible to write C with the mindset of assembly language and get far closer to hand-written assembler performance, but it doesn't look so programmer friendly when that exercise is done Wink The compiler can never know your intent Smile hahah, fun stuff.

Cheers

Edit: As my colleague just pointed out, I should state there is much more "wrong" with the code fragment listed above. For example, the compiler obviously doesn't know your tables are full of zeroes and ones for example, etc. If we were writing it in assembler, we'd just set the return value from the table directly, instead of having two additional dependency chained instructions before the return, etc. etc. Just more examples again of how HLL's can only go so far. hehe

_________________
2 Ton Digital - https://2ton.com.au/
Post 19 Apr 2016, 00:59
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 15237
Location: 1I/ʻOumuamua
For a task that runs in only 0.35s the timing is very fragile and subject to the whims of OS clocking controls and background tasks stealing cycles. If this thing runs all day everyday then it might be a worthwhile goal to make it 5% faster (and thus one can buy 5% fewer machines and save some $) but otherwise ... ?

Aside: It is always possible to find some HLL task that performs equally as well as the asm version. Usually something that it cache unfriendly and uses sparse arrays will be almost impossible to make any significant improvement by using asm. But some tasks can be made hugely faster than any HLL compiler could ever hope achieve when one can exploit the internal CPU instructions and data paths to the fullest. Choose your optimising tasks with caution. Choose to put your time into those areas where the gain will be most.


Last edited by revolution on 19 Apr 2016, 04:24; edited 1 time in total
Post 19 Apr 2016, 01:49
View user's profile Send private message Visit poster's website Reply with quote
redsock



Joined: 09 Oct 2009
Posts: 265
Location: Australia
revolution: agreed fully Smile

Boy did I open a can of worms stepping into this thread, haha... so my colleague asked me to actually analyze the adj5 function from a runtime perspective and to justify in real numbers by previous statement about whether or not a mul is really going to be better.

Hahah, sure enough, gcc's 3 separate lea instructions as it turns out is the same basic cycle counts, but here is the official note taking as I walked through it (annotated gcc output, and then my rewritten version that does the same thing). I think it is particularly interesting that sometimes compilers have a tendency to be "too fancy" for their own good.

Compiler optimized gcc adj5 function again (noting this is specific to Ivy Bridge):

Code:
        movsxd rdi,edi                          ; sign extend edi, latency 2, recip 0.5
        movsxd rsi,esi                          ; sign extend esi, latency 2, recip 0.5
                ; 2 core clocks in until rdi is sign extended
        lea    rax,[rdi+rdi*2]                  ; rax = rdi * 3, latency 1, recip 0.5
                ; 3 core clocks here
        lea    rax,[rdi+rax*4]                  ; rax = (rax * 4) + rdi, or rdi * 13, latency 1, recip 0.5
                ; 4 core clocks here
        lea    rax,[rdi+rax*4]                  ; rax = (rax * 4) + rdi, or rdi * 53, latency 1, recip 0.5
                ; 5 core clocks here
        add    rsi,rax                          ; + rsi, latency 1, recip 0.33
                ; 6 core clocks here
        mov    eax,DWORD PTR [rsi*4+0x405ce0]   ; load dword from table into eax, latency 2, recip 0.5
                ; wait 2 more for the result, so now we are at 8 core clocks
        test   eax,eax                          ; test eax, latency 1, recip 0.33
                ; 9 core clocks
        setne  al                               ; setnz al, latency 1, recip 0.5
                ; 10, although the ret will go before the result is ready
                ; also, is there a partial register penalty for using the 8bit here?
        ret 


And a rewritten version that does the same thing:

Code:
        imul    raxrdi53                    ; rax = rdi * 53, latency 3, recip 1
                ; 3 core clocks until rax has our result
        add     raxrsi                        ; + rsi, latency , recip 0.33
                ; 4 core clocks here
        mov     eax, [rax*4+0x405ce0]
                ; latency for the load is 2, but since the result won't be used until after the return
                ; its somewhere between 4.5 and 6 core clocks before we bail out.
        ret



Smile A hopefully amusing walk down optimising compilers lane.

Cheers again

_________________
2 Ton Digital - https://2ton.com.au/
Post 19 Apr 2016, 01:59
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
revolution, I ran this for 2 weeks (or maybe more, it's been a while) on our school server, utilizing 12 cores. There was more to it then -- I stripped out all the nasty multithreading code I wrote then and am planning on rewriting it better, faster, and cleaner before I put this thing on my resume and post it to my github.
Post 19 Apr 2016, 02:54
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 6951
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
you guys are so awesome & cool!
Post 19 Apr 2016, 04:08
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
sleepsleep, you seem like you enjoy learning a lot. You should check out some MooCs and learn this stuff. You can get a pretty high quality CS education for free on the internet these days.

Check this out: https://github.com/open-source-society/computer-science

They even tell you what order to do the classes in. If you took all of these, you would know way more than me and almost every CS graduate in the US.
Post 19 Apr 2016, 04:44
View user's profile Send private message Reply with quote
redsock



Joined: 09 Oct 2009
Posts: 265
Location: Australia
Tyler, I meant to say thanks for putting this up Smile It was a fun diversion earlier today for me both conversationally, as well as my running at the mouth here in the thread.

Are you going to proceed with it? And if so, are you going to restructure the baseline code and/or test data?

Cheers

_________________
2 Ton Digital - https://2ton.com.au/
Post 19 Apr 2016, 07:42
View user's profile Send private message Reply with quote
redsock



Joined: 09 Oct 2009
Posts: 265
Location: Australia
Spent some this morning over my morning coffee and reworked your C++ version.

None of the changes I made affect any of its previous functionality.

On my machine, this reworked version is 2.2X faster than your original C++.

https://ideone.com/u3sMA5

_________________
2 Ton Digital - https://2ton.com.au/
Post 19 Apr 2016, 22:07
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Sorry for the radio silence today. I had to finish a project for a deadline.

What restructuring would you like for me to do? You mean compiling them separately and then linking them? Sure.

I'll post another test case when I get back on my laptop (posting from phone rn). I can get you one that takes a couple minutes with my version. (Well, I can give you test cases that will run longer than either of us will live, but I think a couple minutes is more like what you want, right?)
Post 19 Apr 2016, 23:10
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
As promised:


Code:

tyler@smsng:~/Desktop/graph2$ time echo 233 | ./graph
int connects[129][129] = {
  {0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,0,1,1,1,1,0,1,0,0,0,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,0,1,1,1,0,0,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,0,0,1,1,1,0,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,0,0,0,1,0,1,1,1,1,0,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
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