On 17 Jul 2014 18:52, "Archos" <raul...@sent.com> wrote:
> Does the Go team has thinked into a next version without the garbage collector?
Nope.
Does the Go team has thinked into a next version without the garbage collector?
Go is very cool to use but I need the best possible performance since I've not deep pockets like Google. When you are small, you need try to minimize the cost of the servers.
You seem to be making an assumption that good performance mean no GC and
GC mean poor performance. Certainly people in the games industry make
this assumption, sometimes validly but usually because the idea has
become a meme.
Traditional garbage collected languages, whilst achieving high throughput, often struggle with predictable latencies as when GC kicks in, particularly in Stop-The-World collectors.
On Thu, 2014-07-17 at 01:52 -0700, Archos wrote:
Certainly people in the games industry make
this assumption, sometimes validly but usually because the idea has
become a meme.
четверг, 17 июля 2014 г., 12:26:32 UTC+3 пользователь Russel Winder написал:On Thu, 2014-07-17 at 01:52 -0700, Archos wrote:Certainly people in the games industry make
this assumption, sometimes validly but usually because the idea has
become a meme.And yet almost every modern game has GC somewhere inside (many games use some scripting engine for game logic, i.e. Lua,
and there are many games written in C#, Java, ActionScript),
On 17 Jul 2014 19:38, "Archos" <raul...@sent.com> wrote:
>
> Targeting 30fps, you have 33ms to render whole frame; Losing 20 ms of that to GC would make things challenging. And if you're targeting 60fps, that's 16ms; stop the world for 20ms, and you've missed 1 and 1/4 of a frame.
>
Go is not the language for this. High performance gaming is not the target. Go without a GC would basically be Rust and have the difficulties associated with that level of resource management. You can't actually make GC optional in a programming language because it completely changes the design of APIs.
But most gaming isn't that high performance. The best selling PC game of all time is a first person 3D game written in Java.
A small embedded scripting language, mainly Lua, is used to write the game logic but it does not affect the processing of entire frames.
But those games are not real-time games running at 30 or 60fps.
четверг, 17 июля 2014 г., 14:11:08 UTC+3 пользователь Archos написал:A small embedded scripting language, mainly Lua, is used to write the game logic but it does not affect the processing of entire frames.Of course it does, it's not some magic.
But those games are not real-time games running at 30 or 60fps.You are seriously wrong. There are tons of "realtime" games (some are very famous and popular) written in languages with GC.
El jueves, 17 de julio de 2014 13:31:15 UTC+1, alexru...@gmail.com escribió:
четверг, 17 июля 2014 г., 14:11:08 UTC+3 пользователь Archos написал:
You are seriously wrong. There are tons of "realtime" games (some are very famous and popular) written in languages with GC.
Ok, tell me three real-time games built with a language without GC, and of course without bindings to a language garbaged.
Whether the usage of a embedded scripting language (garbaged) does not affect to the processing of frames is because such processing is done with a language no-garbaged (usually C++).
Tell me three real-time games built with a language WITH GC, and of course without bindings to a language garbaged.
I'm asking about AAA real-time games
--
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/d/optout.
Does the Go team has thinked into a next version without the garbage collector?
Go is very cool to use but I need the best possible performance since I've not deep pockets like Google. When you are small, you need try to minimize the cost of the servers.
And Rust does a great balance between a language of high level without a significant loss of performance.
I've been translating some Go projects from Go to Rust but the task is very large, especially since every time there are more interesting projects for me.
So, the fastest way for me will be to build a transpiler from Go to Rust. At least there is some intention to have an optional garbage collection.
However, Go is easier to prototype.
--
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/d/optout.
This "discussion" is crazy.It should NOT be about games - the initial statement was about using server resources on GC causing the cost to move beyond acceptable - so can we _please_ stop with the games-*ock-measuring? ;-)
Does the Go team has thinked into a next version without the garbage collector?
Go is very cool to use but I need the best possible performance since I've not deep pockets like Google. When you are small, you need try to minimize the cost of the servers.
And Rust does a great balance between a language of high level without a significant loss of performance.
I've been translating some Go projects from Go to Rust but the task is very large, especially since every time there are more interesting projects for me.
So, the fastest way for me will be to build a transpiler from Go to Rust. At least there is some intention to have an optional garbage collection.
However, Go is easier to prototype.
I'd hate to see the golang community waste resources trying to shoehorn manual memory management and gc together into one language
Only to have your project Calimstore built in Rust, it would be worth the effort.
Sorry, I was wrong again :(
To make it clear, please
Tell me three real-time games built with a language with GC (i.e. Java), and of course, without bindings to a language without GC (i.e. C++).
El jueves, 17 de julio de 2014 13:39:05 UTC+1, Archos escribió:
El jueves, 17 de julio de 2014 13:37:37 UTC+1, Archos escribió:
El jueves, 17 de julio de 2014 13:31:15 UTC+1, alexru...@gmail.com escribió:
четверг, 17 июля 2014 г., 14:11:08 UTC+3 пользователь Archos написал:
You are seriously wrong. There are tons of "realtime" games (some are very famous and popular) written in languages with GC.
Ok, tell me three real-time games built with a language without GC, and of course without bindings to a language garbaged.
I mean:
Tell me three real-time games built with a language WITH GC, and of course without bindings to a language garbaged.
I didn't say by the optional GC; Rust is lower-level (than Go) so programs that are I/O bound system (file systems, databases) should have a better performance.
On Friday, July 18, 2014 1:05:39 PM UTC+12, Andrew Gerrand wrote:On 18 July 2014 04:57, Archos <raul...@sent.com> wrote:Only to have your project Calimstore built in Rust, it would be worth the effort.
Why would you care? Camlistore works great in Go. Optional GC wouldn't help. It's a largely I/O bound system.
There is a recent trend where people care what language something is written in, even when it doesn't affect the end user.
My favourite examples are when people call things like a spreadsheet program Gospreadsheet.or Jspreadsheet. end users shouldn't care what language X is written in if its a useful tool, so don't name your project like that.
In reality it only matters if its a software library, or is meant to be extensible.
"Are you quite sure that all those bells and whistles, all those wonderful facilities of your so called powerful programming languages, belong to the solution set rather than the problem set?"
— Edsger W. Dijkstra
For example, a value used in a closure in a function could be locally heap allocated if the compiler notices the closure itself doesn't escape, unless I'm missing something. I have no idea how hard that would be to implement, though.
I have recently started dabbling with the Unreal Engine development kit. You might know the Unreal Engine from almost every single AAA FPS game currently on the market. The language you write your game logic in for it is C++, or Epic's "dialect" of it. You know what they implemented for their C++ framework? Garbage collection.
Also every Jak and Daxter game and Crash Bandicoot game use engines written in variants of Allegro Common LISP that compiled to Playstation 2 native MIPS, and that uses a generational GC. To be fair, they also used inline assembly in places, but Go can use assembly too if you want. But was the engine very good? Well, they made a seamless streaming world with it. With multiple viewports. On a Playstation 2. So yes, I'd say so.
All UnrealEngine 3 games use a garbage collected scripting language for a wide variety of critical tasks.
Sam
From: golan...@googlegroups.com [mailto:golan...@googlegroups.com]
On Behalf Of Archos
Sent: Thursday, July 17, 2014 7:39 AM
To: golan...@googlegroups.com
Cc: raul...@sent.com; alexru...@gmail.com
Subject: Re: [go-nuts] Go 2.0 without garbage collector?
El jueves, 17 de julio de 2014 13:37:37 UTC+1, Archos escribió:
El jueves, 17 de julio de 2014 13:31:15 UTC+1, alexru...@gmail.com escribió:
четверг, 17 июля 2014 г., 14:11:08 UTC+3 пользователь Archos написал:
You are seriously wrong. There are tons of "realtime" games (some are very famous and popular) written in languages with GC.
Ok, tell me three real-time games built with a language without GC, and of course without bindings to a language garbaged.
I mean:
Tell me three real-time games built with a language WITH GC, and of course without bindings to a language garbaged.
--
The best possible performance actually comes from using a Garbage Collector for memory management in all but one case. That specific case is writing an application which needs to run in as little memory as possible, regardless of the performance impact of that decision. As we all know, that situation virtually never arises in modern programming. Also note that this situation generally does not apply to large programs, because the coding complexity of manual memory management throughout a large codebase results in inefficient memory practices that negate the theoretical advantage offered by manual management.
However, the following caveats do hold:
1. For a particular application (algorithm and/or memory usage characteristics), some garbage collector will outperform the available manually-managed allocators for that application. However, there is no garbage collector which performs best for all applications. The best production garbage collectors generally fall into three categories according to the anticipated majority of applications which will run within the environment:
a. High-throughput collectors which target applications with exceptionally large memory spaces, and often allocate objects at higher rates than seen in other applications. These could be called “server” collectors (not to be confused with the -server command line option in the JVM).
b. Concurrent, low-latency collectors which balance throughput with pauses and are widely applicable to “client” applications. By overall usage, these are currently the most commonly used garbage collectors, and are the foundations of both the current .NET Framework collector and the JVM.
c. Real-time garbage collectors which provide hard guarantees regarding the duration of a pause. These collectors are used in specialized applications where a long GC pause poses a physical threat (e.g. system control software for aviation). IBM’s Metronome is a prime example of this type of collector.
2. The amount of work required to implement an efficient garbage collection environment within a new language is not only enormous, but often requires the involvement of researchers who focus on this particular area of software development (and aren’t particularly common). The “easy” to implement collectors are frequently much slower than the better algorithms, resulting in the unfortunately common situation where garbage collectors get a bad name. In particular, when a garbage collector is first introduced to a new environment, users observe poor performance compared to the manually-managed environment in which they previously worked, but they do not realize that this deficit is due to the particular garbage collector which was added and not an overall characteristic of all garbage collectors.
a. One of the best ways for young garbage-collected languages to be fairly evaluated for new language features is to write a compiler that targets the bytecode of an existing runtime system that includes a high-performance garbage collector. The most well supported options are the CLI (.NET) and the JVM (Java). For better or worse, larger projects with better funding (such as Go) tend to have an easier time avoiding this path.
Thanks,
Sam
From: golan...@googlegroups.com [mailto:golan...@googlegroups.com]
On Behalf Of Archos
Sent: Thursday, July 17, 2014 3:52 AM
To: golan...@googlegroups.com
Subject: [go-nuts] Go 2.0 without garbage collector?
Does the Go team has thinked into a next version without the garbage collector?
Go is very cool to use but I need the best possible performance since I've not deep pockets like Google. When you are small, you need try to minimize the cost of the servers.
And Rust does a great balance between a language of high level without a significant loss of performance.
I've been translating some Go projects from Go to Rust but the task is very large, especially since every time there are more interesting projects for me.
So, the fastest way for me will be to build a transpiler from Go to Rust. At least there is some intention to have an optional garbage collection.
However, Go is easier to prototype.
--
Hi Philip,
For this abstract overview, performance is measured in terms of particular applications. I base this on a general observation that for any frequently used metric of performance in an application, specialized garbage collectors have been created which outperform manual allocation/releasing in the same application. Runtime environments which are known to run many different kinds of programs typically use collectors that balance the needs of a wide variety of expected use cases, and within the past few years have done an exceptional job in practice.
“Inefficient memory practices” can manifest in many ways, both direct and indirect. One example of a direct inefficiency involves implementing GC-like features such as reference-counting pointers in C++ to addresses certain memory management concerns, often with great success in very large codebases. The downsides of this include both the use of additional memory for the reference count and the performance impact of manipulating reference counts. While “best practices” for these pointers (e.g. passing by const reference to avoid incrementing/decrementing the count) serve to reduce the performance impact, you will never reach the performance offered by GC-backed reference counting solutions such as Ulterior Reference Counting. An indirect efficiency might be that time spent resolving memory allocation issues may leave developers with less available time during the development cycle to address higher-level concerns such as algorithms and communication layers within the software. Performance frequently suffers in these areas regardless of the memory management system in use, so keeping developer resources available to focus on them can be very valuable.
Thanks,
Sam
Hi Nicolas,
Every “usable” language provides a standard runtime library of some form. Such a library could easily be considered an “extra runtime”, on the definition that an “extra runtime” provides necessary supporting features which were not directly implemented as part of the running application. The only difference between a garbage collector implementation and a standard runtime library is whether the features are implicitly or explicitly invoked.
Garbage collectors have two primary purposes:
1. Accurately reclaim memory, typically measured as a bounded approximation over liveness.
2. Meet or exceed the performance of manual memory management strategies.
In reality, the first item is very easy to implement using simple, proven strategies. Mark-sweep garbage collectors have existed since (at least) 1967, and copying collectors since at least 1978. The second item, on the other hand, is extraordinarily difficult, with substantial contributions being made even in the last 5 years. Addressing the second point frequently leads to questions about the ongoing correctness of the collector (i.e., attempting to meet item #2 can easily cause bugs where it no longer meets item #1). For young languages which do not execute within a well-known virtual machine and include garbage collection as part of the language specification, limiting the implementation to just the first point allows for developers to focus on other critical aspects of the language.
As a case-in-point, the Mono project used a relatively slow off-the-shelf garbage collector (boehm-gc) from 2002 all the way until late 2009. It wasn’t until February 2011 that the performance-enhanced collector finally shipped in Mono 2.10. For other languages which haven’t reached this point and have facilities in the language specification to support manual memory management, it could make sense to provide garbage collection as an optional feature. I don’t personally support such a decision, but I understand both the motivation that leads to it and recognize the potential for it to improve near-term benchmarks for young languages prior to the introduction of high-performance garbage collection.
Rather than resort to this strategy, I typically encourage language developers to initially compile to the bytecode of an existing virtual machine which already offers high-performance garbage collection. An obvious added benefit is these runtime environments typically have well-established support for features like reliable debugging, profiling, and extensive runtime memory analysis. Language developers must evaluate these advantages in the context of their expected audience and the types of applications they intend to support.
Thanks,
Sam
From: golan...@googlegroups.com [mailto:golan...@googlegroups.com]
On Behalf Of Nicolas Grilly
Sent: Thursday, July 24, 2014 8:36 AM
To: Sam Harwell
Cc: Philip O'Toole; Archos; golan...@googlegroups.com
Subject: Re: [go-nuts] Go 2.0 without garbage collector?
Hi Sam,
--
I love Rust but it is unstable. I am sick and tired of changing my Rust programs in order to compile after each version.So I am waiting 1.0 .Go is much simpler than Rust and therefore easier to program, so I am experimenting now with Go and am quitesatisfied. However performance is not strong point of Go, and it is not just because of GC.
On Friday, 25 July 2014 15:00:47 UTC+10, branimir....@gmail.com wrote:
I love Rust but it is unstable. I am sick and tired of changing my Rust programs in order to compile after each version.So I am waiting 1.0 .Go is much simpler than Rust and therefore easier to program, so I am experimenting now with Go and am quitesatisfied. However performance is not strong point of Go, and it is not just because of GC.Them's fighting words, Citation Needed, please.
I think most of the performance problems people post on this board seem to come from overusing hashmaps. If you treat Go as C with channels and slices, it generally performs quite well.
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/rvFasvA3usk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
I think most of the performance problems people post on this board seem to come from overusing hashmaps. If you treat Go as C with channels and slices, it generally performs quite well.
One of my favorites is Daniel Frampton’s doctoral dissertation, which is very well-written and very thorough.
Garbage Collection and the Case for High-level Low-level Programming
If you really have some time to spend on the subject, here’s the reading list from a course I took on Memory Management.
http://www.cs.utexas.edu/users/mckinley/395Tmm/schedule.html
The work on Jikes RVM eventually prompted me to build a bootstrapping all-managed virtual machine based on ECMA-335 (though it was never released). Between having to get a “real job” and shifting my research emphasis to high-performance parsing for IDEs (e.g. GoWorks), I haven’t had the time available to complete this project. I do have a public repository containing my C# port of AsmJit, which I used for the x86 and x64 code generation.
Sam
From: golan...@googlegroups.com [mailto:golan...@googlegroups.com]
On Behalf Of Nicolas Grilly
Sent: Friday, July 25, 2014 5:21 AM
To: golan...@googlegroups.com
Cc: nic...@vocationcity.com; philip...@yahoo.com; raul...@sent.com
Subject: Re: [go-nuts] Go 2.0 without garbage collector?
Thank you Sam. That's a really interesting take on the subject. Do you have any link to some papers supporting this point of view?
--
Is garbage collection a good idea?The software engineering benefits of garbage collection over explicit memory management are widely accepted, but the performance trade-off in languages designed for garbage collection is unexplored. Section 5.3 shows a clear mutator performance advantage for contiguous over free-list allocation, and the architectural comparison shows that architectural trends should make this advantage more pronounced. The traditional explicit memory management use of malloc() and free() is tightly coupled to the use of a free-list allocator—in fact the MMTk free-list allocator implemen- tation is based on Lea allocator, which is the default allocator in standard C libraries. Standard explicit memory management is thus unable to exploit the locality advantages of contiguous allocation. It is therefore possible that garbage collection presents a performance advantage over explicit memory management on current or future architectures.
You can also see some other reasons why GC can be faster that I outlined above:
https://groups.google.com/d/msg/Golang-nuts/rvFasvA3usk/FvwRBeFAtl0J
--
Some people are spreading FUD about garbage collection, using this as an argument to promote languages like Rust, where GC is optional, and disqualify Go. This is the reason why I try to educate myself about the **real** advantages and shortcomings of GC.
Whether Rust has attracted to professional developers from gaming industry has been due to very good reasons. It is not a coincidence that there are so many projects related to games being built in Rust and any other related to kernels.