gonum / blas

A BLAS implementation for Go [DEPRECATED]
172 stars 16 forks source link

use go generate to generate benchmark code #76

Closed fhs closed 9 years ago

btracey commented 9 years ago

The original isn't great code. I think the better fix is to have the benchmark code itself live in testblas, and then have the BenchmarkXxx stubs live in goblas and cblas.

fhs commented 9 years ago

Maintaining this amount of benchmark code by hand will be a lot work. I still think everything should be autogenerated, including the stubs if you end up factoring out some of the code in a package like testblas.

You have less than 300 lines of code that generates lots of benchmarks. You can clean it up a little and maybe make it shorter by using the reflect package to get the method parameter names and types.

btracey commented 9 years ago

Sorry, I didn't mean to suggest it shouldn't be automated. I was suggesting the actual benchmark code live in testblas, and then just have stubs in goblas and cblas like is there for the other benchmarks.

fhs commented 9 years ago

This doesn't merge anymore. Closing.