Speeding-up the Portfolio, Time is power! ⚡

During my exodus into rust-development, I have concurrently worked through learning GO. This alternate language is static-typed, fast, safer than C & provides the same basic functionality I wish to acquire from rust whilst having a simpler instruction set, much "happier" syntax and better route to employment. Do not get me wrong, I love rust and I will continue to learn it as it is making me a better programmer, but I believe that GO gets things done faster! well... it gets developed faster, rust is speedking :)
-
Essentially, I tasked myself with speeding-up the portfolio. I didn't and still don't care if that is done using WASM, Yew, GO or otherwise (please no JS, I already find it annoying).
To figure this out, I looked into my options using GO (as it is easier and still very fast). I fell upon Gin and Fiber, Gin felt a little too BASIC (EG. everyone uses it) and I thought to myself "I hate going with the sensible option, afterall I already use Rails in 2023! Lets go for something different!".
In the end, I sided with an custom MVC-structures framework consisting of GORM w/ PostgreSQL & Fiber!
-
To test the speed of the language, I created a blank Rails benchmark with a home/posts index page and a very basic application.css file. I then took these views, controllers, models and assets and translated them for use in my GO MVC model. After this, as to minimise the variables, I ran both off the same Linux single-core server from the same port yada yada yada.
THE RESULTS SPEAK FOR THEMSELVES
wow...
The difference was huge and my mind was made... This was only preliminary however. Ruby isn't inherently performant and doesn't play as well with stronger hardware as our modern static languages such as Rust & GO. The next step in elimination is comparing development time, package size & web performance + concurrency/async with an equivalent Rust framework (prebuilt or otherwise). The ultimate victory will be for the language which is the fastest to develop whilst maintaining satisfactory performance and package size. Everybody knows Rails is extremely fast to create and slow in production, the framework has aided me hugely in prototyping the Portfolio and getting me up to speed. Unfortunately, the sun has set upon it's performance and it is time to recreate the framework within a faster, compiled language. Why? Because it is fun... stay tuned!

Comments


Add a comment: