Skip to content

Commit

Permalink
转移至antlabs账号下面
Browse files Browse the repository at this point in the history
  • Loading branch information
guonaihong committed Nov 6, 2022
1 parent 30d8380 commit 6d29579
Show file tree
Hide file tree
Showing 32 changed files with 67 additions and 67 deletions.
8 changes: 4 additions & 4 deletions avltree/avltree.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package avltree

// apache 2.0 guonaihong
// apache 2.0 antlabs

// 参考资料
// /~https://github.com/skywind3000/avlmini
import (
"errors"
"fmt"

"github.com/guonaihong/gstl/api"
"github.com/guonaihong/gstl/cmp"
"github.com/guonaihong/gstl/vec"
"github.com/antlabs/gstl/api"
"github.com/antlabs/gstl/cmp"
"github.com/antlabs/gstl/vec"
"golang.org/x/exp/constraints"
)

Expand Down
4 changes: 2 additions & 2 deletions avltree/avltree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"testing"

"github.com/guonaihong/gstl/cmp"
"github.com/guonaihong/gstl/vec"
"github.com/antlabs/gstl/cmp"
"github.com/antlabs/gstl/vec"
"github.com/stretchr/testify/assert"
)

Expand Down
8 changes: 4 additions & 4 deletions btree/btree.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package btree

// apache 2.0 guonaihong
// apache 2.0 antlabs

// 参考资料
// /~https://github.com/tidwall/btree
import (
"errors"
"fmt"

"github.com/guonaihong/gstl/api"
"github.com/guonaihong/gstl/must"
"github.com/guonaihong/gstl/vec"
"github.com/antlabs/gstl/api"
"github.com/antlabs/gstl/must"
"github.com/antlabs/gstl/vec"
"golang.org/x/exp/constraints"
)

Expand Down
6 changes: 3 additions & 3 deletions btree/btree_bench_test.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package btree

// apache 2.0 guonaihong
// apache 2.0 antlabs
import (
"fmt"
"testing"
)

// goos: darwin
// goarch: amd64
// pkg: github.com/guonaihong/gstl/btree
// pkg: github.com/antlabs/gstl/btree
// cpu: Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
// BenchmarkGet-8 1000000000 0.5326 ns/op
// PASS
// ok github.com/guonaihong/gstl/btree 25.315s
// ok github.com/antlabs/gstl/btree 25.315s
// 五百万数据的Get操作时间
func BenchmarkGet(b *testing.B) {
max := 1000000 * 5.0
Expand Down
4 changes: 2 additions & 2 deletions btree/btree_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package btree

// apache 2.0 guonaihong
// apache 2.0 antlabs
import (
"fmt"
"testing"

"github.com/guonaihong/gstl/cmp"
"github.com/antlabs/gstl/cmp"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion cmp/cmp.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package cmp

// apache 2.0 guonaihong
// apache 2.0 antlabs
import (
"golang.org/x/exp/constraints"
)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/guonaihong/gstl
module github.com/antlabs/gstl

go 1.19

Expand Down
2 changes: 1 addition & 1 deletion ifop/ifop.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ifop

// apache 2.0 guonaihong
// apache 2.0 antlabs
func If[T any](cond bool, t T) (zero T) {
if cond {
return t
Expand Down
2 changes: 1 addition & 1 deletion ifop/ifop_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ifop

// apache 2.0 guonaihong
// apache 2.0 antlabs
import (
"testing"

Expand Down
4 changes: 2 additions & 2 deletions linkedlist/linkedlist.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package linkedlist

// apache 2.0 guonaihong
// apache 2.0 antlabs
// 参考文档如下
// https://cs.opensource.google/go/go/+/go1.18.1:src/container/list/list.go
// /~https://github.com/torvalds/linux/blob/master/tools/include/linux/list.h
Expand All @@ -21,7 +21,7 @@ package linkedlist
import (
"errors"

"github.com/guonaihong/gstl/cmp"
"github.com/antlabs/gstl/cmp"
)

var ErrListElemEmpty = errors.New("list is empty")
Expand Down
6 changes: 3 additions & 3 deletions linkedlist/linkedlist_benchmark_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package linkedlist

// apache 2.0 guonaihong
// apache 2.0 antlabs
import (
"container/list"
"testing"
Expand All @@ -9,12 +9,12 @@ import (

// goos: darwin
// goarch: amd64
// pkg: github.com/guonaihong/gstl/linkedlist
// pkg: github.com/antlabs/gstl/linkedlist
// cpu: Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
// Benchmark_ListAdd_Stdlib-8 5918479 190.0 ns/op
// Benchmark_ListAdd_gstl-8 15942064 83.15 ns/op
// PASS
// ok github.com/guonaihong/gstl/linkedlist 3.157s
// ok github.com/antlabs/gstl/linkedlist 3.157s
type timeNodeStdlib struct {
expire uint64
userExpire time.Duration
Expand Down
4 changes: 2 additions & 2 deletions linkedlist/linkedlist_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package linkedlist

// apache 2.0 guonaihong
// apache 2.0 antlabs
import (
"testing"

"github.com/guonaihong/gstl/must"
"github.com/antlabs/gstl/must"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion must/must.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package must

// apache 2.0 guonaihong
// apache 2.0 antlabs
func TakeOne[T any](v T, err error) T {
if err != nil {
panic(err.Error())
Expand Down
8 changes: 4 additions & 4 deletions radix/radix.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package radix

// apache 2.0 guonaihong
// apache 2.0 antlabs
import (
"strings"
"unicode/utf8"

"github.com/guonaihong/gstl/api"
"github.com/guonaihong/gstl/cmp"
"github.com/guonaihong/gstl/vec"
"github.com/antlabs/gstl/api"
"github.com/antlabs/gstl/cmp"
"github.com/antlabs/gstl/vec"
)

var _ api.Trie[int] = (*Radix[int])(nil)
Expand Down
4 changes: 2 additions & 2 deletions rbtree/rbtree.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package rbtree

// apache 2.0 guonaihong
// apache 2.0 antlabs
// 参考资料
// /~https://github.com/torvalds/linux/blob/master/lib/rbtree.c
import (
"errors"

"github.com/guonaihong/gstl/api"
"github.com/antlabs/gstl/api"
"golang.org/x/exp/constraints"
)

Expand Down
6 changes: 3 additions & 3 deletions rbtree/rbtree_bench_test.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package rbtree

// apache 2.0 guonaihong
// apache 2.0 antlabs

// goos: darwin
// goarch: amd64
// pkg: github.com/guonaihong/gstl/rbtree
// pkg: github.com/antlabs/gstl/rbtree
// cpu: Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
// BenchmarkGetAsc-8 1000000000 0.3336 ns/op
// BenchmarkGetDesc-8 1000000000 0.3702 ns/op
// BenchmarkGetStd-8
// 1000000000 0.8940 ns/op
// PASS
// ok github.com/guonaihong/gstl/rbtree 139.415s
// ok github.com/antlabs/gstl/rbtree 139.415s
import (
"fmt"
"testing"
Expand Down
4 changes: 2 additions & 2 deletions rbtree/rbtree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"testing"

"github.com/guonaihong/gstl/cmp"
"github.com/guonaihong/gstl/vec"
"github.com/antlabs/gstl/cmp"
"github.com/antlabs/gstl/vec"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion rhashmap/opt.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package rhashmap

// apache 2.0 guonaihong
// apache 2.0 antlabs
type Option interface {
apply(*config)
}
Expand Down
4 changes: 2 additions & 2 deletions rhashmap/rhashmap.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package rhashmap

// apache 2.0 guonaihong
// apache 2.0 antlabs
// 参考资料
// /~https://github.com/redis/redis/blob/unstable/src/dict.c
import (
Expand All @@ -10,7 +10,7 @@ import (
"unsafe"

"github.com/cespare/xxhash/v2"
"github.com/guonaihong/gstl/api"
"github.com/antlabs/gstl/api"
)

var _ api.Map[int, int] = (*HashMap[int, int])(nil)
Expand Down
10 changes: 5 additions & 5 deletions rhashmap/rhashmap_bench_test.go
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
package rhashmap

// apache 2.0 guonaihong
// apache 2.0 antlabs
import (
"fmt"
"testing"
)

// goos: darwin
// goarch: amd64
// pkg: github.com/guonaihong/gstl/rhashmap
// pkg: github.com/antlabs/gstl/rhashmap
// cpu: Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
// BenchmarkGet-8 1000000000 0.4066 ns/op
// BenchmarkGetStd-8 1000000000 0.8333 ns/op
// PASS
// ok github.com/guonaihong/gstl/rhashmap 130.007s.
// ok github.com/antlabs/gstl/rhashmap 130.007s.
// 比标准库快一倍.

// goos: darwin
// goarch: amd64
// pkg: github.com/guonaihong/gstl/rhashmap
// pkg: github.com/antlabs/gstl/rhashmap
// cpu: Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
// BenchmarkSet-8 1000000000 0.1690 ns/op
// BenchmarkSetStd-8 1000000000 0.1470 ns/op
// PASS
// ok github.com/guonaihong/gstl/rhashmap 3.970s
// ok github.com/antlabs/gstl/rhashmap 3.970s
// 五百万数据的Get操作时间
func BenchmarkGet(b *testing.B) {
max := 1000000.0 * 5
Expand Down
2 changes: 1 addition & 1 deletion rhashmap/rhashmap_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package rhashmap

// apache 2.0 guonaihong
// apache 2.0 antlabs
import (
"sort"
"testing"
Expand Down
6 changes: 3 additions & 3 deletions set/set.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package set

// apache 2.0 guonaihong
// apache 2.0 antlabs
import (
"github.com/guonaihong/gstl/api"
"github.com/guonaihong/gstl/rbtree"
"github.com/antlabs/gstl/api"
"github.com/antlabs/gstl/rbtree"
"golang.org/x/exp/constraints"
)

Expand Down
2 changes: 1 addition & 1 deletion set/set_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package set

// apache 2.0 guonaihong
// apache 2.0 antlabs
import (
"testing"

Expand Down
4 changes: 2 additions & 2 deletions skiplist/skiplist.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package skiplist

// apache 2.0 guonaihong
// apache 2.0 antlabs

// 参考文档如下
// /~https://github.com/redis/redis/blob/unstable/src/t_zset.c
Expand Down Expand Up @@ -40,7 +40,7 @@ import (
"math/rand"
"time"

"github.com/guonaihong/gstl/api"
"github.com/antlabs/gstl/api"
"golang.org/x/exp/constraints"
)

Expand Down
6 changes: 3 additions & 3 deletions skiplist/skiplist_bench_test.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package skiplist

// apache 2.0 guonaihong
// apache 2.0 antlabs
import (
"fmt"
"testing"
)

// goos: darwin
// goarch: amd64
// pkg: github.com/guonaihong/gstl/skiplist
// pkg: github.com/antlabs/gstl/skiplist
// cpu: Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
// BenchmarkGet-8 1000000000 0.7746 ns/op
// BenchmarkGetStd-8 1000000000 0.7847 ns/op
// PASS
// ok github.com/guonaihong/gstl/skiplist 178.377s
// ok github.com/antlabs/gstl/skiplist 178.377s
// 五百万数据的Get操作时间
func BenchmarkGet(b *testing.B) {
max := 1000000.0 * 5
Expand Down
4 changes: 2 additions & 2 deletions skiplist/skiplist_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package skiplist

// apache 2.0 guonaihong
// apache 2.0 antlabs
import (
"fmt"
"testing"

"github.com/guonaihong/gstl/cmp"
"github.com/antlabs/gstl/cmp"
"github.com/stretchr/testify/assert"
)

Expand Down
Loading

0 comments on commit 6d29579

Please sign in to comment.