Earlier quoted context omitted.
To be fair, that is now the common "I rewrote X in Y" theme, which followed upon the Y ∈ { Ruby, Clojure, Scala, Kotlin,.... } from previous years.
And Go too! It's always fun to see posts from around 2014/2015 complaining about how every submission to Hacker News is now "I wrote X in Go", while now Go is the boring stuff and Rust is the hot new thing. I wonder what will be the next Rust though.
Taming Go’s memory usage, or how we avoided rewriting our client in Rust
151–160 of 231 posts
Re: Taming Go’s memory usage, or how we avoided rewriting our client in Rust
#152Earlier quoted context omitted.
And Go too! It's always fun to see posts from around 2014/2015 complaining about how every submission to Hacker News is now "I wrote X in Go", while now Go is the boring stuff and Rust is the hot new thing. I wonder what will be the next Rust though.
BPF-verified C.
Re: Taming Go’s memory usage, or how we avoided rewriting our client in Rust
#153The big wins in this article, in what I believe was the order of impact: * They do raw packet reassembly using gopacket, and gopacket keeps TCP reassembly buffers that can grow without bound when you miss a TCP segment. They capped the buffers, and the huge 5G spikes went away. * They were reading whole buffers into memory before handing them off to YAML and JSON parsers. They passed readers instead. * They were usin…
> They stopped compiling regexps on the fly and moved the regexps to package variables. (I actually don't know if this was a significant win; there might just be the three big wins.) Anecdotally, this could be a huge win, depending on how often it's called. A guy I was working with, new to Go, was writing a router config parser and asked why it was so slow. The first thing I did was moved regexp.Compile from a hot pa…
Re: Taming Go’s memory usage, or how we avoided rewriting our client in Rust
#154Earlier quoted context omitted.
> it's an intrinsic Law Of The Universe that if data comes in a X bytes per second, and leaves at X-k bytes per second, then eventually you will use all storage space in the Universe for your buffer, This is known as Little's Law. Using Little's Law, you know that if the average time spent in queue is more than the average time it takes for a new entry to be added to the queue, then your queue fills up.
Did Little formulate multiple eponymous laws? Since that does not seem to be the Little's law that I'm familiar with.
Re: Taming Go’s memory usage, or how we avoided rewriting our client in Rust
#155Earlier quoted context omitted.
People who is interested in rust maybe want to see how it was used. The author could have just kept "Taming Go's Memory Usage". Maybe they never considered rewriting in rust. The pros and cons looks like just some random arguments to add rust to the title.
> The author could have just kept "Taming Go's Memory Usage". It’s their article. They can choose to write it however they want. You may find this type of humor distasteful, fine, write your articles that way. As a user of both rust and golang, I chuckled at the headline and then forgot about it.
Re: Taming Go’s memory usage, or how we avoided rewriting our client in Rust
#156Earlier quoted context omitted.
Did Little formulate multiple eponymous laws? Since that does not seem to be the Little's law that I'm familiar with.
Here's a good introduction to Little's Law and associated operational rules derived from it on queues: http://web.eng.ucsd.edu/~massimo/ECE158A/Handouts_files/Litt...
Re: Taming Go’s memory usage, or how we avoided rewriting our client in Rust
#157Earlier quoted context omitted.
> They stopped compiling regexps on the fly and moved the regexps to package variables. (I actually don't know if this was a significant win; there might just be the three big wins.) Anecdotally, this could be a huge win, depending on how often it's called. A guy I was working with, new to Go, was writing a router config parser and asked why it was so slow. The first thing I did was moved regexp.Compile from a hot pa…
I've seen the same in Python, probably a dozen times. Sometimes folks think it's ugly (un-pythonic) but there's plenty of cases in the standard library to point to.
I'd only use a variable when I'm using the same regex multiple times in code, and even then I could still just have the variable be the string.
Re: Taming Go’s memory usage, or how we avoided rewriting our client in Rust
#158"How we avoided rewriting in Rust" feels like clickbait given that the answer is "our problems were algorithmic, not language-specific"
Re: Taming Go’s memory usage, or how we avoided rewriting our client in Rust
#159After using Rust for a few years professionally it's my take that people that really want to use it haven't had much experience with it on real world projects. It just doesn't live up to the hype that surrounds it. The memory and CPU savings are negligible between Go and Rust in practice no matter what people might claim in theory. However, the side effects of making your team less productive by using Rust is a much…
> the side effects of making your team less productive by using Rust is a much higher price to pay than just running you Go service on more powerful hardware. This entirely depends on the ratio of development effort to deployed instances. At one end of the spectrum, lots of developers work for years on a system which is only deployed on one machine; obviously you optimize for developer effort and buy a single massive…
There is a vicious cycle: few projects use Rust because the productivity hit is large, and programmers do not get enough experience using Rust because few projects use it.
Re: Taming Go’s memory usage, or how we avoided rewriting our client in Rust
#160Earlier quoted context omitted.
I've seen the same in Python, probably a dozen times. Sometimes folks think it's ugly (un-pythonic) but there's plenty of cases in the standard library to point to.
That's because the Python regex module caches the regexes it compiles, so it only happens once. It's proper and good usage to specify the regex string inline, even in a hot path. I'd only use a variable when I'm using the same regex multiple times in code, and even then I could still just have the variable be the string.