Google releases "GO" today

0 views
Skip to first unread message

zie

unread,
Nov 11, 2009, 12:35:55 PM11/11/09
to iR Developer Community
Just some news that will break out soon...

Google released It's own open source programming language.
http://code.google.com/p/go/
WOW, it's a python looking syntax with C++ performance. I think this
is an answer to much needed innovated up and coming technologies,
nothing has changed for the last decade they say. I did their sample
packages and it built faster than I could count to 0 so it's
ridiculously fast. It will certainly have an active development
community so I'm waiting to see what they come up with; cough cough
FileMaker Integration. I do like the idea of new ways of thinking and
approaching problems. http://golang.org/

P.S. I wonder what that means to java,python,c++, and java scripts.
The only 4 languages used at Google.

Vlad Zhylkovski

unread,
Nov 14, 2009, 10:10:07 AM11/14/09
to irdevco...@googlegroups.com
Zie,

C++ is in general 10 times slower than C, which means that Go cannot
replace the C programming language and the latter one will continue to
exist and be used as it has been for the past 30 years.

Interestingly, the Go language has pointers, but no pointer
arithmetic, which makes it inconvenient to use pointers. Not sure
experienced C/C++ developers would like it.

-Vlad

zie

unread,
Nov 14, 2009, 11:56:46 AM11/14/09
to iR Developer Community
Hi Vlad,

I think go was created for a few reasons. I think it is fair to say
that it's still experimental but seems to have been trying to tackle
the big limitation of other standards. The web and desktop technology
has come up a long way and new developers are looking into quick easy
dynamic script languages like python. Go having speed and having a
performance of a compile language like C++ is amazing to me at least.
The language is experimental obviously, you cannot control resources.
Haha, I wasn't saying that Go will become the standard next week but
It's open sourced and it will be pushed by a giant like Google. The
syntax is good enough for first programmers and I'm sure they can have
a Guido Van Robot out there in no time. You can get C performance with
C++ with it's compiler. I don't think for the most part, developers
will easily buy this because It's opened and it's pushed by Google
plus it's here to take on the challenges that standard languages have
brought to the table. Humn for me, it's all about innovation and big
mash-ups, don't want to be stuck in the same limitations 15 years from
now. You are right, I still don't think this will be easy for the go
team at all.

zloua...@gmail.com

On Nov 14, 10:10 am, Vlad Zhylkovski <v...@inresonance.com> wrote:
> Zie,
>
> C++ is in general 10 times slower than C, which means that Go cannot  
> replace the C programming language and the latter one will continue to  
> exist and be used as it has been for the past 30 years.
>
> Interestingly, the Go language has pointers, but no pointer  
> arithmetic, which makes it inconvenient to use pointers. Not sure  
> experienced C/C++ developers would like it.
>
> -Vlad
>
> On Nov 11, 2009, at 12:35 PM, zie wrote:
>
>
>
> > Just some news that will break out soon...
>
> > Google released It's own open source programming language.
> >http://code.google.com/p/go/
> > WOW, it's a python looking syntax with C++ performance. I think this
> > is an answer to much needed innovated up and coming technologies,
> > nothing has changed for the last decade they say. I did  their sample
> > packages and it built faster than I could count to 0 so it's
> > ridiculously fast. It will certainly have an active development
> > community so I'm waiting to see what they come up with; cough cough
> > FileMaker Integration. I do like the idea of new ways of thinking and
> > approaching problems.http://golang.org/

Vlad Zhylkovski

unread,
Nov 15, 2009, 8:12:39 PM11/15/09
to irdevco...@googlegroups.com
Hi Zie,

I've been experimenting with the Go language.

I really like how it has multiple return values from functions. Not too many languages have this. Casting is also done in a clean way.

I put together 3 (6) quick programs (C, C++, Go), that I attached to this file, to test performance of Go, that do the same thing - find divisors for a sequence of numbers with the starting number and the number of numbers specified (e.g. for start = 10, count = 3 it would find divisors for 10, 11, 12).

divisors.c, divisors.cpp, divisors.go - use inefficient way of computing divisors
divisors2.c, divisors2.cpp, divisors2.go - use better way of computing divisors

Inefficient method (start = 1 million, count = 10):

Run & time:
time ./divisors_c 10000000 10
time ./divisors_cpp 10000000 10
time ./divisors_8 10000000 10

Results with timing (time only):
C:
real 0m2.389s
user 0m2.266s
sys 0m0.021s

C++:
real 0m2.512s
user 0m2.265s
sys 0m0.020s

Go:
real 0m1.858s
user 0m1.712s
sys 0m0.018s

Hard to believe, but Go outperformed both C and C++


More efficient method (this time starting higher, start = 1 billion, count = 10):

Run & time:
time ./divisors2_c 1000000000  10
time ./divisors2_cpp 1000000000  10
time ./divisors2_8 1000000000  10

Results with timing (time only):
C:
real 0m0.035s
user 0m0.013s
sys 0m0.003s

C++:
real 0m0.052s
user 0m0.015s
sys 0m0.004s

Go:
real 0m0.128s
user 0m0.101s
sys 0m0.006s

In this case both C and C++ outperformed Go. In this case all programs used the math library, and I wonder if that's what slowed Go down.

Obviously, these tests aren't enough to fully test the speed of the Go programming language, but interestingly the speeds vary.

People are saying that the gccgo compiler has some problems (e.g. memory leaks) and has the only advantage that output programs are a bit faster, and [568]g, [568]l are recommended over it. I have not tried gccgo yet.
-Vlad


divisors2.go
divisors.c
divisors.cpp
divisors.go
divisors2.c
divisors2.cpp

Z.L. Ouattara

unread,
Nov 15, 2009, 11:30:21 PM11/15/09
to irdevco...@googlegroups.com, irdevco...@googlegroups.com
Nice Vlad, 

This test result  is interesting! I use i386 architecture for both my osx and ubuntu obviously both [8g, 8l] but I have not bothered with gccgo either, I hear it has stacks problems but it should be good at the end of the year. What people are noticing in my opinion is the lack of resourses(memory) management, doesn't have garbage collector. Maybe Things are not completly clear to me yet but it seems like the standard C,C++ memory management can be automated in Go. As far as speed is concern go coders might have to rethink the way they write codes(google always does this) because Go is really takes parrallel processors very seriously whereas other languages were built without today's computer powers in mind. So I think to take advantage of this, those Go programmers will need to think differently. Go seems more fun though :) . Might play with it when it improves and there is an IDE. 


Sent from my iPhone
<divisors.c>
<divisors.cpp>
<divisors.go>
<divisors2.c>
<divisors2.cpp>
<divisors2.go>
Reply all
Reply to author
Forward
0 new messages