Golang? Where can I learn about that language?
So I am just sometimes wondering the main issue is GC performance ?
Some operations in Go are definitely faster than in C++, such as calculating the length of a string:)
The garbage collectors are not guaranteed to be slower than malloc-based manual memory management. As Go's GC matures, the overhead will diminish.
The GC needs to search for unreferenced pointers, which is unused data it can remove from memory when it seems appropriate to the GC. Searching for unreferenced pointers is a process that consumes CPU cycles which is not the case when memory is freed manually. So GCs will always impose some overhead no matter what maturity level a GC has reached. Modern GCs have stop-the-world times below 10 ms. So this is good enough for server-side systems programming which is what Google wants to use Go for.
I'm not sure but it seems to me like you're using 'array' where 'slice' is the real meaning. B/c Go _has_ "true" multidimensional arrays.
-j
With some work, Go could probably beat C on number-crunching.
John said "For an array of arrays (or slices, in Go), each access to a
new row involves an extra indirection".
What you're depicting holds for arrays of slices (or a slice of
slices). It's not true for array of arrays.
-j
Some operations in Go are definitely faster than in C++, such as calculating the length of a string:)
[1]
http://benchmarksgame.alioth.debian.org/u64/benchmark.php?test=all&lang=go&lang2=yarv
*
[2]
http://benchmarksgame.alioth.debian.org/u64/benchmark.php?test=all&lang=go&lang2=v8
*
[3]
http://benchmarksgame.alioth.debian.org/u64/benchmark.php?test=all&lang=go&lang2=php
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I don't think it is really honest to suggest Go will be as fast as C++.
So Go is merely used as some scripting language that compiles to the metal and runs very fast.
So Go is merely used as some scripting language that compiles to the metal and runs very fast.Ouch, please do take that back: https://code.google.com/p/go-wiki/wiki/SuccessStories
I don't think it is really honest to suggest Go will be as fast as C++.
I don't think so, either. Go has to offer a considerable performance improvement over Java to make a case for itself.
What the fsck are you guys talking about? Go is _no_ scripting
language. It doesn't even remotely resemble a(ny) scripting language
wrt its design, tool chain, ...
-j
I disagree; Go does not need to offer a performance improvement over Java to make a case for itself. Go already offers many other non-performance improvements (simplicity, tool, etc.). Better performance is nice, but personally I would prefer Go even if it was 2x slower than Java.
I disagree. IMHO mixing of the terms 'Go' and 'scripting language' in
this thread is a total BS.
Concurrency is almost useless without select/alt, and select requires
language (not library) support.
- is swallowed by a compiler and later a linker spits out machine code
to be directly executed by the CPU
- is statically type checked AOT
then such program is not written in a scripting language.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
- is swallowed by a compiler and later a linker spits out machine code
to be directly executed by the CPU
- is statically type checked AOT
then such program is not written in a scripting language.
I would even disagree with Russ about the duck typing note.
Let's agree our disagreement is permanent ;-)
PS: I would even disagree with Russ about the duck typing note. IMO
duck typing would mean that this would be valid iGo: `a := 42; b :=
"314"; c := a + b`.
It's interesting that Go is by a multitude slower in the regex-dna benchmark compared to almost all other languages. Admittedly, I'm too lazy to have a closer look into what this regex-dna is doing. Evnetually it is a GC intensive one. Hope the guys at benchmarksgame.alioth.debian.org will update their measurments for Go 1.1. in not much time. Am really curious to see how the results are then.
I've never heard of that, but don't know much about the internal design of most languages
2) Information on why it is unsafe to run regexes on input strings in
other languages (unless it's just because of potential DoS attacks...
Hope the guys at benchmarksgame.alioth.debian.org will update their measurments for Go 1.1. in not much time. Am really curious to see how the results are then.
This particular benchmark is already an evergreen discussed at many
other sites. It "shows" Go regular expression engine is very slow,
specifically wrt 'pcre' which most of the other languages at shootout
use.
It's an example how rubbish the numbers from made-up
benchmarks are or could be. Intention or ignorance, who knows?
-snip-
That's why I had:
> * The standard disclaimer(s) about benchmarks obviously applies here
> as well.
which Bienlein removed from the reply. It's still good to point out
things like http://swtch.com/~rsc/regexp/regexp1.html (and I forgot to
do that myself.)
Ah, okay. I thought you meant the former -- that internally these
languages are using regexes as part of their runtime/interpreter because
it's faster (perhaps due to using a C library) than interpreting some
types of code directly...
I missed this the first time. If I understand correctly, you are talking
about the input being a regex itself, not the input being a string that
is sent to a regex that is hardcoded into the code.
On Tue, Apr 16, 2013 at 1:22 PM, Bienlein <jet...@web.de> wrote:
>> What the fsck are you guys talking about? Go is _no_ scripting
>> language. It doesn't even remotely resemble a(ny) scripting language
>> wrt its design, tool chain, ...
>
> You are not getting it. You can use it in a similar way. That's what the
> guys at Google are doing who moved from Python to Go.
I disagree. IMHO mixing of the terms 'Go' and 'scripting language' in
this thread is a total BS. Maybe I don't get it. Maybe I'm not the one
who doesn't get it.
Some operations in Go are definitely faster than in C++, such as calculating the length of a string:)
Some operations like array shuffling as in this sudoku benchmark are even slower than in Java using Go 1.1: http://attractivechaos.wordpress.com/2013/04/06/performance-of-rust-and-dart-in-sudoku-solving/
The garbage collectors are not guaranteed to be slower than malloc-based manual memory management. As Go's GC matures, the overhead will diminish.
The GC needs to search for unreferenced pointers, which is unused data it can remove from memory when it seems appropriate to the GC. Searching for unreferenced pointers is a process that consumes CPU cycles which is not the case when memory is freed manually. So GCs will always impose some overhead no matter what maturity level a GC has reached. Modern GCs have stop-the-world times below 10 ms. So this is good enough for server-side systems programming which is what Google wants to use Go for.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Are you implying that Go allows you to write "bug-free, concurrent code"? :)
I once used some Java library (JCSP) that implemented alt/select on channels.
It was a bit clunky to use but it did work. You basically called a function
and switched on its return value. The function (given an array of channels)
would block until a channel gets ready. Then you do the read from the channel
in the case clause.
(...)
http://www.cs.kent.ac.uk/projects/ofa/jcsp/
On Tuesday 16 April 2013 14:39:35 Aram Hăvărneanu wrote:
> Concurrency is almost useless without select/alt, and select requires
> language (not library) support.
I once used some Java library (JCSP) that implemented alt/select on channels.
It was a bit clunky to use but it did work. You basically called a function
and switched on its return value. The function (given an array of channels)
would block until a channel gets ready. Then you do the read from the channel
in the case clause.
(...)
http://www.cs.kent.ac.uk/projects/ofa/jcsp/
Lars
Golang is a compiled static typed language with GC.C/C++ is a compiled static typed language without GC.So I am just sometimes wondering the main issue is GC performance ?
I like your irony ;-).. Blocking channels can easily result in the system or components of it to lock up in case some expected message required by the coordination logic does not arrive. So you have to work with timeouts to prevent the system from freezing.