Scaling our Spreadsheet Engine from Thousands to Billions of Cells in #golang
https://www.causal.app/blog/scaling by @CausalHQ
https://www.causal.app/blog/scaling by @CausalHQ
causal.app
Scaling our Spreadsheet Engine from Thousands to Billions of Cells - The Causal Blog
From Maps to Arrays
Forwarded from Daniel Lemire's blog
Go generics are not bad
When programming, we often need to write ‘generic’ functions where the exact data type is not important. For example, you might want to write a simple function that sums up numbers. Go lacked this notion until recently, but it was recently added (as of version 1.18). So I took it out for a spin. In Java, generics work well enough as long as you need “generic” containers (arrays, maps), and as long as stick with functional idioms. But Java will not let me code the way I would prefer. Here is how I would write a function that sums up numbers: int sum(int[] v) { int summer = 0; for(int k = 0; k < v.length; k++) { summer += v[k]; } return summer; } What if I need to support various number types? Then I would like to write the following generic function, but Java won’t let me. // this Java code won't compile static T sum(T[] v) { T summer = 0; for(int k = 0; k < v.length; k++) { summer += v[k]; }…
https://lemire.me/blog/2022/07/08/go-generics-are-not-bad/
When programming, we often need to write ‘generic’ functions where the exact data type is not important. For example, you might want to write a simple function that sums up numbers. Go lacked this notion until recently, but it was recently added (as of version 1.18). So I took it out for a spin. In Java, generics work well enough as long as you need “generic” containers (arrays, maps), and as long as stick with functional idioms. But Java will not let me code the way I would prefer. Here is how I would write a function that sums up numbers: int sum(int[] v) { int summer = 0; for(int k = 0; k < v.length; k++) { summer += v[k]; } return summer; } What if I need to support various number types? Then I would like to write the following generic function, but Java won’t let me. // this Java code won't compile static T sum(T[] v) { T summer = 0; for(int k = 0; k < v.length; k++) { summer += v[k]; }…
https://lemire.me/blog/2022/07/08/go-generics-are-not-bad/
🇺🇦 Go performance channel
https://twitter.com/calebspare/status/1546928290123812864
Twitter
New #Go memory model seems to be like Java: no undefined behavior due to data races, only race conditions (all variables are atomic-ish). This inhibits lots of compiler optimizations C/C++ compilers typically do.
But races on strings/maps still lead to arbitrary…
But races on strings/maps still lead to arbitrary…
Nice #golang proposal by twitter.com/mbmcloughlin is accepted 🎉:
testing: add Elapsed() method to testing.B
https://github.com/golang/go/issues/43620
testing: add Elapsed() method to testing.B
https://github.com/golang/go/issues/43620
X (formerly Twitter)
Michael McLoughlin (@mbmcloughlin) on X
Mathematical Software Engineer.
Mastodon @mbmcloughlin@mastodon.social
Bluesky @mmcloughlin.com
Mastodon @mbmcloughlin@mastodon.social
Bluesky @mmcloughlin.com
🇺🇦 Go performance channel
Nice #golang proposal by twitter.com/mbmcloughlin is accepted 🎉: testing: add Elapsed() method to testing.B https://github.com/golang/go/issues/43620
One more step to the better #golang benchmarks (now by twitter.com/mknyswe, also accepted 😉):
testing: report GC/op when b.ReportAllocs is called
https://github.com/golang/go/issues/52466
testing: report GC/op when b.ReportAllocs is called
https://github.com/golang/go/issues/52466
X (formerly Twitter)
mknyszek (@mknyswe) on X
works on @golang runtime | he/him
> We’re all agreed that we want something platform-independent and vector-length agnostic. ARM is especially interested in it being vector-length agnostic because of new SVE instructions.
❤️🔥
Src: #golang compiler and runtime meeting notes (golang/go issue 43930)
❤️🔥
Src: #golang compiler and runtime meeting notes (golang/go issue 43930)
🇺🇦 Go performance channel
> We’re all agreed that we want something platform-independent and vector-length agnostic. ARM is especially interested in it being vector-length agnostic because of new SVE instructions. ❤️🔥 Src: #golang compiler and runtime meeting notes (golang/go issue…
To be honest @Arm Memory Tagging Extension is also a hot thing but more about safety rather than performance.
🇺🇦 Go performance channel
To be honest @Arm Memory Tagging Extension is also a hot thing but more about safety rather than performance.
Twitter
@go_perf @Arm There may be some applications for GCs. E.g. marking pointers to objects w/o pointers (don't need scanning) or encoding object size right in the pointer (for some common small sizes at least).