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
vup2 is now known as vup
emeb has quit [Quit: Leaving.]
<cr1901_modern> time seconds seconds calls us/call us/call name
<cr1901_modern> 64.95 82.88 82.88 46323267 1.79 1.79 cxxrtl_design::p_jt51::eval()
<cr1901_modern> I included the raw gmon.out in that zip file (as well as analysis.txt)
<whitequark> that looks ... very reasonable
<whitequark> basically the way it should look
<cr1901_modern> Well chalk it up to "my machine is showing it's age"
<whitequark> lemme run your .exe under wine
<cr1901_modern> You're gonna need some dlls maybe I think... if you do I'll send them in another zip
<cr1901_modern> libstdc++-6.dll libgcc_s_seh-1.dll libwinpthread-1.dll ??? (yes, very helpful ldd, thanks)
<whitequark> yep
<whitequark> libgcc_s_seh-1.dll libstdc++-6.dll is wanted by wine
<cr1901_modern> zip is updated
<cr1901_modern> Dunno what "??? => ??? (0x150000)" means, but if it doesn't affect you... who cares?! :D
<whitequark> hm. so the linux binary runs for 30s, the windows for 42s
<whitequark> wait, let me retry
<whitequark> nope, 30s vs 40s it is
<whitequark> it could be wine communication overhead
<cr1901_modern> Sure. And 40s is not 127s (which is what the anlysis.txt says).
<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> real 2m9.672s
<whitequark> can you give me the binary?
<cr1901_modern> Different binary to distinguish the profiled version
<cr1901_modern> sorry, zip name*
<whitequark> yep, much better
<whitequark> so... 30s vs 36s, and the files match
<whitequark> so, 20% overhead in wine, seems reasonable
<cr1901_modern> real 2m9.740s... no difference :o
<cr1901_modern> Uhhh, does anyone else in the channel run windoze
<cr1901_modern> and doesn't run it on old hardware?
<cr1901_modern> (Binary timestamp is newer than changes to source, so confirmed that I didn't build the wrong binary)
<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.
<brendantcc> https://ttm.sh/2D-.png thank Foone for this :p
<brendantcc> https://ttm.sh/dxx.jpg also here's a cat distraction
<cr1901_modern> That is a good brown tabby :3
<brendantcc> that's the very same kitty who's currently curled up against me in bed rn lol
HXLNT has joined ##yamahasynths
Xyz_39808 has quit [Read error: Connection reset by peer]
Xyz_39808 has joined ##yamahasynths
HXLNT has quit [Ping timeout: 240 seconds]
kode54 has quit [Quit: The Lounge - https://thelounge.chat]
Ruxnor has quit [Read error: Connection reset by peer]
kode54 has joined ##yamahasynths
Ruxnor has joined ##yamahasynths
emeb has joined ##yamahasynths
<cr1901_modern> cbmuser: I asked this last month, but you == Adrian in the 68k chat?
Xyz_39808 has quit [Remote host closed the connection]
Xyz_39808 has joined ##yamahasynths