Skip to content

Test for the speed to do maxpooling in pure go , goroutine, and Cgo.

License

Notifications You must be signed in to change notification settings

GMfatcat/Go_C_filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go_C_filter

Goal:

Test for the speed to do convolution in pure go , goroutine, and Cgo.

Test with max pooling instead of convolution

Small JPG and Large JPG

Max pooling process in c completed in: 10050800
Max pooling process in go completed in: 3557900
Max pooling process in goroutine completed in: 517400
1000 times average for small image:
C avg: 2.042432ms
Go avg: 3.540069ms
Goroutine avg: 613.049µs
1000 times average for large image:
C avg: 51.926401ms
Go avg: 71.978682ms
Goroutine avg: 10.886355ms
Max pooling process completed.

What's Next?

  1. find out how to use cgo in go mods(not use in main.go) -> 2024/1/26 done
  2. Try to speed up go version by goroutine -> 2024/1/26 done
// make sure to get gcc compiler
go run pooling.go

About

Test for the speed to do maxpooling in pure go , goroutine, and Cgo.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published