ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Go language
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
Ron Murawski



Joined: 29 Oct 2006
Posts: 272
Location: Schenectady, NY

PostPost subject: Re: Go language    Posted: Fri Jun 15, 2012 7:12 pm Reply to topic Reply with quote

Don wrote:
Ron Murawski wrote:
Go compiles really quickly but performance is not good at all. It is one of the slowest of the compiled languages. There have been promises made to improve Go performance, but these changes have not been implemented yet.

Go vs C
http://shootout.alioth.debian.org/u64/benchmark.php?test=all&lang=go&lang2=gcc

Go vs C++
http://shootout.alioth.debian.org/u64/benchmark.php?test=all&lang=go&lang2=gpp


It's not so clear to me. A lot of the speed issues have to do with inefficient libraries that could be much better optimized and benchmarks that rely on those libraries. Another major issue is garbage collection which can be worked around.

I think it may be the case that Go is quite fast if you become an expert in writing fast go code - but that remains to be proved.

There is an example of a benchmark that showed Go being really slow but some simple analysis showed that the code was poorly written - or at least that it was not written well. The code was fixed up appropriate and a fair comparison was made (where both C and Go were doing the same thing) and it was very close to C in performance. And it turned out that the Java implementation already had those enhancements and would have been obscenely slow too. So one has to be extremely skeptical of any benchmark.

I'm not defending Go, it may indeed still be very slow but I'm reserving judgement for now. C code is usually fast because we know how to write C code and we are often forced to do things manually that some languages do automatically at a cost - but we don't have to use those language features.

One issue for me is "what is the point" if I have to go too far out of my way to write "pedal to the metal" fast code. I guess the point is that if you find a good language you can use it for more things. The idea of being able to use Go for high performance things as well as quick scripts without the pain of C is appealing - even if I still have to work harder to write "seriously fast" code. Is Go than language? I don't know.


Hi Don,

Don wrote:

I think it may be the case that Go is quite fast if you become an expert in writing fast go code - but that remains to be proved.


The shootout benchmarks try to treat each language fairly. Advocates of the Go language are encouraged to submit more optimized Go code for any of the individual benchmark tests that they feel is poorly written. The implementation with the fastest time is the one displayed in the comparison charts that I linked to. Take a look here:
http://shootout.alioth.debian.org/u64/measurements.php?lang=go
As you can see, there have been several attempts to further optimize the Go code.

Don wrote:

A lot of the speed issues have to do with inefficient libraries that could be much better optimized and benchmarks that rely on those libraries.


Improving the inefficient Go libraries is one of the promises that have been made, but not yet implemented. Go is a fully compiled language that, right now, runs at about the same speed as Java byte code running on its JIT.

The original question was this:
rreagan wrote:
How does the Go language compare performance wise to C/C++ for writing a chess engine?


The performance of Go is plenty fast enough for most purposes, but it is not fast enough for top-level chess programs.

Best regards,
Ron
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Subject Author Date/Time
Go language Russell Reagan Fri Jun 15, 2012 4:40 am
      Re: Go language Ron Murawski Fri Jun 15, 2012 5:18 am
            Re: Go language Don Dailey Fri Jun 15, 2012 2:23 pm
                  Re: Go language Ron Murawski Fri Jun 15, 2012 7:12 pm
                        Re: Go language Don Dailey Fri Jun 15, 2012 7:27 pm
                              Re: Go language Ron Murawski Fri Jun 15, 2012 9:46 pm
                                    Re: Go language Don Dailey Fri Jun 15, 2012 11:16 pm
                                          Re: Go language Russell Reagan Sat Jun 16, 2012 3:39 am
                                                Re: Go language Ron Murawski Sat Jun 16, 2012 4:24 am
                                                      Re: Go language Don Dailey Sat Jun 16, 2012 4:44 am
                                                            Re: Go language Russell Reagan Sat Jun 16, 2012 8:52 pm
                                          Re: Go language Ron Murawski Sat Jun 16, 2012 4:06 am
      Re: Go language H. Schlichting Thu Jun 21, 2012 8:08 pm
            Re: Go language Don Dailey Thu Jun 21, 2012 8:12 pm
                  Re: Go language H. Schlichting Thu Jun 21, 2012 8:25 pm
                        Re: Go language Don Dailey Thu Jun 21, 2012 8:31 pm
            Re: Go language H. Schlichting Thu Jun 21, 2012 10:19 pm
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads