Spontaneous computer science exercise on the stream today.
Conversation
Notices
-
Embed this notice
Kris Nóva (nova@hachyderm.io)'s status on Sunday, 11-Dec-2022 08:02:20 JST Kris Nóva -
Embed this notice
Kris Nóva (nova@hachyderm.io)'s status on Sunday, 11-Dec-2022 08:04:29 JST Kris Nóva C disassembly
-
Embed this notice
Kris Nóva (nova@hachyderm.io)'s status on Sunday, 11-Dec-2022 08:07:55 JST Kris Nóva Rust disassembly (much bigger)
-
Embed this notice
Kris Nóva (nova@hachyderm.io)'s status on Sunday, 11-Dec-2022 08:10:31 JST Kris Nóva fib.rs
-
Embed this notice
Kris Nóva (nova@hachyderm.io)'s status on Sunday, 11-Dec-2022 08:11:19 JST Kris Nóva fib.c
-
Embed this notice
Kris Nóva (nova@hachyderm.io)'s status on Sunday, 11-Dec-2022 08:11:52 JST Kris Nóva I realize this is not the most ideal way to share this - just grabbed some screenshots from the stream - I don't know if I have time to publish it anywhere.
-
Embed this notice
Dan Ciruli (danciruli@hachyderm.io)'s status on Sunday, 11-Dec-2022 08:32:53 JST Dan Ciruli @nova Ideal in that is was convenient for you, the content-producer, which is ideal indeed.
-
Embed this notice
Dan Lacher (danlacher@hachyderm.io)'s status on Sunday, 11-Dec-2022 08:44:10 JST Dan Lacher @nova I was watching the steam for a bit, great times. Two questions; what keyboard are you using and which editor?
-
Embed this notice
iamericfletcher (iamericfletcher@hachyderm.io)'s status on Sunday, 11-Dec-2022 08:49:37 JST iamericfletcher @nova hey - how do you get the execution time details?
-
Embed this notice
iamericfletcher (iamericfletcher@hachyderm.io)'s status on Sunday, 11-Dec-2022 08:49:59 JST iamericfletcher @nova also, how do you print this disassembly info?!?
-
Embed this notice
sporksmith :unicycle: :rust: (sporksmith@hachyderm.io)'s status on Sunday, 11-Dec-2022 09:20:36 JST sporksmith :unicycle: :rust: @nova This looks like it might be a debug build? For a release build I'm seeing:
-
Embed this notice
Thomas Hurst (freaky@hachyderm.io)'s status on Sunday, 11-Dec-2022 09:35:46 JST Thomas Hurst @nova Note your C is using signed int, while your Rust is using unsigned.
'unsigned/fib-gcc12' ran
1.19 ± 0.05 times faster than 'signed/fib-gcc12'
1.50 ± 0.01 times faster than 'unsigned/fib-rust168'
1.60 ± 0.04 times faster than 'unsigned/fib-clang13'
1.94 ± 0.06 times faster than 'signed/fib-rust168'
1.96 ± 0.02 times faster than 'signed/fib-clang13' -
Embed this notice
Kris Nóva (nova@hachyderm.io)'s status on Sunday, 11-Dec-2022 10:10:35 JST Kris Nóva @sporksmith Good job!
-
Embed this notice
Florent Vilmart (flovilmart@hachyderm.io)'s status on Sunday, 11-Dec-2022 13:43:51 JST Florent Vilmart @nova pretty sure it was asked before but what’s you terminal emulator?
-
Embed this notice
John Stracke (metageek@techhub.social)'s status on Monday, 12-Dec-2022 03:26:46 JST John Stracke @nova How about comparing them using an iterative algorithm instead?
Kris Nóva repeated this. -
Embed this notice
John Stracke (metageek@techhub.social)'s status on Monday, 12-Dec-2022 03:26:46 JST John Stracke Rust: cargo build --release. C: gcc -O3.
User space time from time:
fib(45):
R, recur: 1.886s, 1.778s, 1.831s
R, iter: 0.000s, 0.000s, 0.001s
C, recur: 0.908s, 0.951s, 0.948s
C, iter: 0.001s, 0.001s, 0.000sfib(50):
R, recur: 20.036s, 20.392s, 20.470s
R, iter: 0.001s, 0.000s, 0.000s
C, recur: 12.016s, 12.056s, 12.159s
C, iter: 0.000s, 0.000s, 0.000sfib(60):
R, recur: >1m
R, iter: 0.001s, 0.000s, 0.000s
C, recur: >1m
C, iter: 0.001s, 0.000s, 0.000s -
Embed this notice
Hazel Weakly (hazelweakly@hachyderm.io)'s status on Monday, 12-Dec-2022 04:48:28 JST Hazel Weakly @nova if you want the galaxy brained version of the Fibonacci sequence in rust, I cobbled this one together to resemble some of the fun golf versions you can write in Haskell
-
Embed this notice