Skip to content

mickyco94/list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

List

List is an implementation of C#'s List<T> type in Go.

This is not something that should be used practically and only stands here as an exercise in data structures.

As shown by the benchmarks below the builtin append() function on slices works more efficiently than this implementation. The implementations are similar in principle, except for the Go specification optimisations found in append() and its lack of use of generics.

Benches

goos: linux
goarch: amd64
pkg: github.com/mickyco94/list
cpu: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
BenchmarkAdd-8      	41773298	        37.46 ns/op	      50 B/op	       0 allocs/op
BenchmarkAppend-8   	73854888	        34.68 ns/op	      82 B/op	       0 allocs/op

About

An implementation of List<T> in go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages