<commit_before>package tao

import (
	"fmt"
	"runtime"
	"strconv"
	"sync"
	"testing"
)

var (
	listN  int
	number int
	list   [][]interface{}
	cMap *ConcurrentMap
	lMap *lockMap
	oMap  map[interface{}]interface{}
)

func init() {
	MAXPROCS := runtime.NumCPU()
	runtime.GOMAXPROCS(MAXPROCS)
	listN = MAXPROCS + 1
	number = 100000
	fmt.Println("MAXPROCS is ", MAXPROCS, ", listN is", listN, ", n is ", number, "\n")

	list = make([][]interface{}, listN, listN)
	for i := 0; i < listN; i++ {
		list1 := make([]interface{}, 0, number)
		for j := 0; j < number; j++ {
			list1 = append(list1, j + i * number / 10)
		}
		list[i] = list1
	}

	cMap = NewConcurrentMap()
	oMap = make(map[interface{}]interface{})
	lMap = newLockMap()
	for i := range list[0] {
		cMap.Put(i, i)
		lMap.put(i, i)
		oMap[i] = i
	}
}

type lockMap struct {
	m  map[interface{}]interface{}
	sync.RWMutex
}

func (t *lockMap) put(k interface{}, v interface{}) {
	t.Lock()
	defer t.Unlock()
	t.m[k] = v
}

func (t *lockMap) putIfNotExist(k interface{}, v interface{}) (ok bool) {
	t.Lock()
	defer t.Unlock()
	if _, ok = t.m[k]; !ok {
		t.m[k] = v
	}
	return
}

func (t *lockMap) get(k interface{}) (v interface{}, ok bool) {<commit_msg>revise benchmark test<commit_after>package tao

import (
	"fmt"
	"runtime"
	"strconv"
	"sync"
	"testing"
)

var (
	listN  int
	number int
	list   [][]interface{}
	cMap *ConcurrentMap
	lMap *lockMap
)

func init() {
	MAXPROCS := runtime.NumCPU()
	runtime.GOMAXPROCS(MAXPROCS)
	listN = MAXPROCS + 1
	number = 100000
	fmt.Println("MAXPROCS is ", MAXPROCS, ", listN is", listN, ", n is ", number, "\n")

	list = make([][]interface{}, listN, listN)
	for i := 0; i < listN; i++ {
		list1 := make([]interface{}, 0, number)
		for j := 0; j < number; j++ {
			list1 = append(list1, j + i * number / 10)
		}
		list[i] = list1
	}

	cMap = NewConcurrentMap()
	lMap = newLockMap()
	for i := range list[0] {
		cMap.Put(i, i)
		lMap.put(i, i)
	}
}

type lockMap struct {
	m  map[interface{}]interface{}
	sync.RWMutex
}

func (t *lockMap) put(k interface{}, v interface{}) {
	t.Lock()
	defer t.Unlock()
	t.m[k] = v
}

func (t *lockMap) putIfNotExist(k interface{}, v interface{}) (ok bool) {
	t.Lock()
	defer t.Unlock()
	if _, ok = t.m[k]; !ok {
		t.m[k] = v
	}
	return
}

func (t *lockMap) get(k interface{}) (v interface{}, ok bool) {
{'fraction_non_alphanumeric': 0.18510546706844597, 'fraction_numerical': 0.014636246233318984, 'mean_word_length': 3.5390625, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3989845', 'n_tokens_mistral': 1027, 'n_tokens_neox': 984, 'n_words': 258}