OXIESEC PANEL
- Current Dir:
/
/
opt
/
golang
/
1.19.4
/
src
/
go
/
token
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
12/01/2022 06:13:56 PM
rwxr-xr-x
📄
example_test.go
1.66 KB
12/01/2022 06:12:58 PM
rw-r--r--
📄
position.go
17.29 KB
12/01/2022 06:12:58 PM
rw-r--r--
📄
position_bench_test.go
484 bytes
12/01/2022 06:12:58 PM
rw-r--r--
📄
position_test.go
9.18 KB
12/01/2022 06:12:58 PM
rw-r--r--
📄
serialize.go
1.43 KB
12/01/2022 06:12:58 PM
rw-r--r--
📄
serialize_test.go
2.47 KB
12/01/2022 06:12:58 PM
rw-r--r--
📄
token.go
6.36 KB
12/01/2022 06:12:58 PM
rw-r--r--
📄
token_test.go
796 bytes
12/01/2022 06:12:58 PM
rw-r--r--
Editing: position_bench_test.go
Close
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package token import ( "testing" ) func BenchmarkSearchInts(b *testing.B) { data := make([]int, 10000) for i := 0; i < 10000; i++ { data[i] = i } const x = 8 if r := searchInts(data, x); r != x { b.Errorf("got index = %d; want %d", r, x) } b.ResetTimer() for i := 0; i < b.N; i++ { searchInts(data, x) } }