Re: [go-nuts] efficient random float32 number generator?

2019-03-05 Thread Damian Gryski
On Monday, February 25, 2019 at 2:39:02 PM UTC-8, DrGo wrote: > > Thanks Ian, > The std lib float32 is slow for my purpose. In my benchmarking it is > actually slower than the float64. But I don’t even need float16 precision. > I am working on implementing othe alias method for sampling from

Re: [go-nuts] Is it practical to auto rearrange struct fields to reduce paddings in Go?

2019-02-12 Thread Damian Gryski
Check out https://github.com/dominikh/go-tools/tree/master/cmd/structlayout and https://github.com/dominikh/go-tools/tree/master/cmd/structlayout-optimize On Wednesday, February 6, 2019 at 8:20:06 PM UTC-8, Kurtis Rader wrote: > > > Is it practical to auto rearrange struct fields to reduce

Re: [go-nuts] A Measure of Hash Function Collisions

2019-02-12 Thread Damian Gryski
For more information on hash function goodness tests, check out https://github.com/demerphq/smhasher Damian On Tuesday, February 12, 2019 at 5:23:39 AM UTC-8, Serhat Şevki Dinçer wrote: > > On Saturday, February 9, 2019 at 5:23:14 PM UTC+3, Serhat Şevki Dinçer > wrote: >> >> On Fri, Feb 8,

[go-nuts] Re: [RFC] Dynamically instrumentation Go binaries

2018-11-15 Thread Damian Gryski
One approach would be to augment the compiler to instrument the binary with the techniques outlined in: XRay: A Function Call Tracing System https://ai.google/research/pubs/pub45287 Damian On Thursday, November 15, 2018 at 9:09:19 AM UTC-8, ju...@sqreen.io wrote: > > Hi, > > I am working on

[go-nuts] Re: top N values

2018-11-06 Thread Damian Gryski
On Tuesday, November 6, 2018 at 12:17:09 PM UTC-8, Josep Casado Pérez wrote: > > Please, check this post answer [https://stackoverflow.com/a/7272702]. Try > to use quickselect and then iterate your slice. I have an implementation of QuickSelect that works with any sort.Interface:

[go-nuts] Re: Go2 proposal: remove := operator (or remove variable shadowing)

2018-10-29 Thread Damian Gryski
On Monday, October 29, 2018 at 5:05:40 AM UTC-7, Sokolov Yura wrote: > > Yes, err handling is a part of variable shadowing mistakes. But it is not > all such mistakes. > I shadowed other variables at least as often as errors. > While shadowing is sometimes an issue, warning every times it

[go-nuts] Re: get_tls macro and friends

2018-01-29 Thread Damian Gryski
Other examples I found in the runtime seem to refer to "go_tls.h". My guess is the /doc/asm page is out of date. Damian On Wednesday, January 24, 2018 at 7:26:18 PM UTC-8, Caleb Spare wrote: > > Quick question about the Go assembler. > > I'm trying to use the get_tls and related macros

[go-nuts] Go Community Charity Work?

2017-12-24 Thread Damian Gryski
In cryptographic terms, this would be a "replay attack", although I'm not sure how any of the standard mitigations would apply in the resl world, especially if the verification is to be done offline. Damian -- You received this message because you are subscribed to the Google Groups

[go-nuts] Re: Is go1.10beta1 a debug or unoptimized build? (possible regression)

2017-12-24 Thread Damian Gryski
I've also seen benchmarks / load testing on my Mac with lots of time in time.now, according to pprof. We were calling time.Now frequently, but it seems this added code might exacerbate the issue. Damian -- You received this message because you are subscribed to the Google Groups

[go-nuts] Re: Announcing gophersat, a SAT and Pseudo-Boolean solver, v1.0.0

2017-12-21 Thread Damian Gryski
Wow, thanks for the detailed answers! Damian -- 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+unsubscr...@googlegroups.com. For more options, visit

[go-nuts] Announcing gophersat, a SAT and Pseudo-Boolean solver, v1.0.0

2017-12-21 Thread Damian Gryski
How does it compare to https://github.com/IRIFrance/gini ? -- 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+unsubscr...@googlegroups.com. For more

Re: [go-nuts] Re: [ANN] go-dedup/simhash, enhanced Go simhash package

2017-07-05 Thread Damian Gryski
On Tuesday, July 4, 2017 at 10:56:35 PM UTC+2, Tong Sun wrote: > > Good to know. > > One question, I didn't find any help/text on how to use it -- why for so > many years, there is no usage help? My guess was that it is mainly for > internal use, not for the general public, but maybe I was

[go-nuts] Re: [ANN] go-dedup/simhash, enhanced Go simhash package

2017-07-04 Thread Damian Gryski
On Monday, July 3, 2017 at 6:33:05 PM UTC+2, Tong Sun wrote: > > FYI, I've just enhanced the Go simhash package from mfonda/simhash > to go-dedup > /simhash > . > > The reasons &

[go-nuts] Re: interesting potential go event talk

2017-06-13 Thread Damian Gryski
Just went to add this to https://github.com/golang/go/wiki/ResearchPapers , but it's already there :) Damian On Sunday, June 11, 2017 at 5:44:33 PM UTC+2, Michael Jones wrote: > > Atom: Horizontally Scaling Strong Anonymity > > "To evaluate Atom, *we implemented an Atom prototype* > *in Go*,

[go-nuts] Re: When appending to arrays, gmp.Int values change for large number arrays

2017-05-14 Thread Damian Gryski
On Sunday, May 14, 2017 at 4:01:26 AM UTC+2, Elise Xue wrote: > > We're using gmp (library found at https://github.com/ncw/gmp) to run on > large inputs, and we have arrays with thousands of elements at a time in > our code. When we write these arrays to files, we find that the values of >

[go-nuts] Panic in go1.8rc3 using cgo to get binary data from database

2017-02-12 Thread Damian Gryski
Please file an issue at https://golang.org/issues Damian -- 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+unsubscr...@googlegroups.com. For more

[go-nuts] Re: bit twiddling API survey

2017-01-11 Thread Damian Gryski
On Wednesday, January 11, 2017 at 12:38:35 AM UTC+1, not...@google.com wrote: > > Are bit rotations complied to single instructions? Specifically things > like: > > var a uint32 > (a << 5) | (a >> (32 - 5) > They will be (with 1.9) for constant rotate values:

[go-nuts] Using Go in a locked down SOC2 environment (dependency management hell)

2017-01-07 Thread Damian Gryski
I've seen this sort of question on the mailong list before. Probably a good idea to gather potential solutions on the Wiki somewhere. Damian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

[go-nuts] Re: Hashing (u)int8

2016-12-17 Thread Damian Gryski
This ends up being only half a megabyte of memory (65536 x 8 byte pointers) for the array-based solution. You can always write your own hash table, or convert your uint16 key to a uint32 for lookup purposes. (I've done the same thing with floats to speed up a float64-keyed hash table.)

[go-nuts] Hashing (u)int8

2016-12-16 Thread Damian Gryski
The runtime has optimized map implementations for strings, int32 and int64-sized thing There is no optimized implementation for int8-sized things -- just use an array. Damian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] Re: Upgraded to Go 1.8beta2 and now Atom go-plus isn't working

2016-12-16 Thread Damian Gryski
On Friday, December 16, 2016 at 4:36:24 PM UTC+1, kcr...@sessionm.com wrote: > > I've had some luck across golang version changes by recompiling > github.com/nsf/gocode, which I believe go-plus uses for autocompletion. > Also https://github.com/mdempsky/gocode which is a cleaned up version

[go-nuts] How to speed up execution time for a set of regular expressions

2016-12-15 Thread Damian Gryski
I wrote a quick tutorial on using ragel to speed up matching regular expressions in Go. https://medium.com/@dgryski/speeding-up-regexp-matching-with-ragel-4727f1c16027 I had planned on writing a few more I n using some of ragels other features for matching things. I have an example of a

Re: [go-nuts] Re: invitation to gophers.slack.com

2016-12-13 Thread Damian Gryski
On Friday, December 9, 2016 at 4:16:45 PM UTC+1, Ian Davis wrote: > > As an aside, does anyone know if there are publicly available chatlogs > from the slack channel? > > There are not. You must be a member of the Gophers Slack to see the message achive. Damian -- You received this

[go-nuts] December Blog Post Series

2016-12-02 Thread Damian Gryski
And my first post on writing assembly functions with PeachPy is up now: https://blog.gopheracademy.com/advent-2016/peachpy/ This is a quick introduction to a tool I've been using in some of my performance work recently. My favourite result so far is speeding up my HighwayHash implementation

[go-nuts] Avoiding function call overhead in packages with go+asm implementations

2016-11-18 Thread Damian Gryski
This is one of those tricks that should be in a "best practices for writing asm with Go" document. Maybe we should start one on the wiki? Including things like "common build tags for disabling asm" and the like. Damian -- You received this message because you are subscribed to the Google

Re: [go-nuts] Re: Stalking people online for thought crimes! This is what the Go project has succumbed to!

2016-11-04 Thread Damian Gryski
On Friday, November 4, 2016 at 8:22:49 PM UTC+1, prade...@gmail.com wrote: > > All I see here is nothing is done to moderate /r/golang despite threads > being reported for harassment. What good is a code of conduct if it isn't > enforced ? and when enforced , moderators have to come here to

[go-nuts] Re: Regexp question

2016-08-16 Thread Damian Gryski
On Tuesday, August 16, 2016 at 1:00:15 PM UTC+2, Jan Mercl wrote: > > This code (A) > > package main > > import ( > "fmt" > "regexp" > ) > > func main() { > fmt.Printf("%v", >

[go-nuts] Re: goimports has been updated

2016-07-15 Thread Damian Gryski
Leaving blank lines in the imports section allows grouping: https://github.com/golang/go/wiki/CodeReviewComments#imports Damian -- 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,