goatlang / goat

Extended flavor of the Go programming language, aiming for increased value safety and maintainability
MIT License
63 stars 1 forks source link

Cgo / FFI performance #8

Open mingue opened 1 year ago

mingue commented 1 year ago

Go will be an amazing language for systems programming too, but there is a big performance penalty on interoperability as everything is a goroutine. If this issue is solved suddenly you will get exposed to a huge amount of libraries comatible with c without performance impact, quickly expanding the uses cases for go, ML, AI, Big Data, Graphics...

More info here: https://stackoverflow.com/questions/28272285/why-cgos-performance-is-so-slow-is-there-something-wrong-with-my-testing-code#28272990

avivcarmis commented 1 year ago

The current idea behind goat is a compile time language (similar to the idea behind typescript if you're familiar with that), meaning that goat files are translated into go files and then executed by go runtime. With this direction I'm not sure we could gain access to runtime aspects like goroutine implementation. Any ideas?