Skip to content

Instantly share code, notes, and snippets.

View Fullstop000's full-sized avatar
🎯
Focusing

Fullstop000 Fullstop000

🎯
Focusing
  • Hangzhou Zhejiang
View GitHub Profile
             +----------+
             |          |
             |    C     |
             |          |
             +----^-+---+
                  | |
                  | |
 MsgAppend(e[4,5])| | MsgAppendResp
 | |
@Fullstop000
Fullstop000 / main.go
Last active November 21, 2019 09:07
Something about pointer and value in go
package main
import (
"fmt"
)
type Test struct {
A int
}
#![feature(test)]
extern crate test;
fn main() {
println!("Hello, world!");
}
#[cfg(test)]
mod tests {
use test::Bencher;
package main
import (
"fmt"
"sync"
"testing"
cmap "github.com/orcaman/concurrent-map"
)
package tt;
import (
"strings"
"testing"
"unsafe"
)
func BenchmarkUnsafePointerVSExplicitlyConvert(b *testing.B) {
s := strings.Repeat("a", 1000)
bytes := []byte(s)