ChanServ changed the topic of ##yamahasynths to: Channel dedicated to questions and discussion of Yamaha FM Synthesizer internals and corresponding REing. Discussion of synthesis methods similar to the Yamaha line of chips, Sound Blasters + clones, PCM chips like RF5C68, and CD theory of operation are also on-topic. Channel logs: https://freenode.irclog.whitequark.org/~h~yamahasynths
<whitequark>
turns out fstream has horrifying virtual call overhead
<whitequark>
lemme do something real quick
<cr1901_modern>
Hmmm, my gmon output doesn't have anything about stream.write
<cr1901_modern>
err the analysis.txt
<whitequark>
cr1901_modern: uh. you have built an outdated version
<whitequark>
that's probably why the times don't match
<cr1901_modern>
GNU gprof (GNU Binutils) 2.33.1
<whitequark>
what? no, of the gist
<whitequark>
you have broken clocking that i fixed and told you earlier
<whitequark>
the RIFF header has 0xffffffff as the size, that's how i can easily tell
<cr1901_modern>
Oh, hmmm... my command history says I rebuilt the binary w/ profiling info _after_ I checked out the most recent copy of the gist. But... sure enough, wav_file.write("RIFF\xff\xff\xff\xff") is present
<whitequark>
look at the end
<whitequark>
waaaait
<whitequark>
the binary is writing profiling info?
<whitequark>
if we're to compare performance i'd need just a plain -O3
<whitequark>
but there's also something screwy with the wav files
<cr1901_modern>
Yea, this binary is instrumented with "-pg"
<whitequark>
because i pass the same parameters and the one your binary outputs is shorter
<cr1901_modern>
Okay, I'm making a temporary Justfile/Makefile of my own for this... brb :P
<cr1901_modern>
whitequark: Okay, simulating now with "g++ -O3 -I$(yosys-config --datdir/include) jt51_core.cc jt51_player.cc -o jt51_play"
<cr1901_modern>
time ./jt51_play.exe arsys.tsv arsys.wav 4000000
<cr1901_modern>
I still have that jt51_sim binary (and backups of it). I'm gonna up the number of steps to 10 million
<cr1901_modern>
I haven't touched the jt51_core.cc/.h since Dec 22
<cr1901_modern>
Let's see what happens
<cr1901_modern>
real 0m41.820s to do 10 million cycles... 41.820 seconds to do 2.5 seconds of audio (16.728).
<cr1901_modern>
(where the hell did I get 20% of real speed from 0.461?!)
<whitequark>
oh
<cr1901_modern>
It appears I can't divide. I think I assumed 1MHz clock speed (which is wrong), and then divided 0.461 by 5 to get "100000 cycles in 0.1 seconds is 1MHz clock speed real time".
<whitequark>
oh.
<cr1901_modern>
Compiled w/ clang++, my Skylake machine is on par w/ your testing (one second of audio generated every 5 seconds). I don't know why Sandy Bridge is 4 times slower. I didn't think Intel made _that_ much improvement in 6-7 years.
<cr1901_modern>
(ballpark range based on how old my laptop was when I got the Skylake machine)
<whitequark>
cr1901_modern: machine code compiled from cxxrtl sources runs at about 2.5 ipc
<whitequark>
on kaby lake
<whitequark>
well, coffee lake here, same difference
<cr1901_modern>
What did you use to measure that?
<whitequark>
`perf stat`
<cr1901_modern>
Ack, I'll keep that in mind
<cr1901_modern>
Anyways, thank you for your help/looking into the performance :)
ZrX-NoMs has quit [*.net *.split]
ZrX-NoMs has joined ##yamahasynths
ugla has quit [Ping timeout: 240 seconds]
emily has quit [Ping timeout: 240 seconds]
ugla has joined ##yamahasynths
emily has joined ##yamahasynths
Stefany_YM2612FP has joined ##yamahasynths
<Stefany_YM2612FP>
Hello everyone, I am Stefany, the creator of the YM2612 FPGA Replacement which core has been designed by Jotego.
<Stefany_YM2612FP>
Just passing by... Will come back later! Cheers
Stefany_YM2612FP has quit [Client Quit]
<ZrX-NoMs>
in and out
<brendantcc>
In 'N' Out?
<ZrX-NoMs>
like clockwork
<cr1901_modern>
I've been doing my irregular (few times a year) rounds of channel evangelism the past few days.