[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>Friend runs his implementation of a DSP program with some

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 35
Thread images: 3

File: facesweat.jpg (41KB, 640x360px) Image search: [Google]
facesweat.jpg
41KB, 640x360px
>Friend runs his implementation of a DSP program with some ridiculous parameters
>On his Thinkpad(tm) it takes ~3 seconds to process a 30 second .raw file
>Sends it over to me
>No recompiling, no nothing, my computer takes >10 minutes to do the same thing.

How can this be happening? We both run Ubuntu but he has a 2.8 GHz I7, while I have an A4-5000. both are quad-core but it's a single-threaded app so it only takes up 25% of the CPU
>>
>>60214550
>AMD Laptop
>expecting anything to happen fast
>>
>>60214550
>A4
there's your're answer my guy
>>
>>60214550
>A4-5000
>quad core

LOL
>>
>>60214550
You have a slow ass cpu my dude, A4 is homeless tier level of poor.
>>
>>60214580
>>60214600
the processor cannot be responsible for such a drastic difference
>>
>Direct Sound Program program
>>
>>60214640
It's Digital Signal Processing you ponce
>>
>>60214618
It absolutely can given it's 1.5GHz at AMD's crappy IPC.
Also, does he have an SSD?
>>
>>60214550
>what are hardware instruction sets
>>
>>60214693
it loads the entire 4.5 MiB file as an array of int_16 at once. The point of comparison arose when I had made my implementation worked on iostreams with a circular buffer that dynamically loaded the data as it was being processed, which reduced the memory footprint to 500 KiB, but may have increased CPU usage.
>>
>>60214844
More efficient pipelining on the i7, better built-in instruction sets, faster clockspeed...

There's tons of reasons why it would run quickly on his machine but not on yours.
>>
>>60214898
Yeah but the difference still seems a bit ridiculous. It's not like you can pipeline more than 5 instructions per step, and the machine code is exactly the same because it's the exact same executable
>>
>>60215149
recompile it then for your machine
>>
>>60215190
still no faster. I may have underestimated the speed since it does do around 20k samples/second which is only around, idk, 30 times slower than his computer so it doesn't seem *that* unreasonable, but i'm still staggered by the difference in that particular application, which is basically multiplying and adding a whole bunch of floats
>>
>>60214550
Ran out of ram and you're using a HDD like the poorfag you are.
>>
>>60215628
literally no

the real answer seems to be that it enter an infinite loop on my computer for some reason

oh yeah i forgot to mention, the program doesn't actually terminate on my PC, i just get bored of waiting after a few minutes
>>
>>60215749
No wait it does terminate, I'm a retard who can't see where the processing is happening
>>
>>60214550
performance difference singlecore is like 6x, then
thermal throttling because cheap cpu = usually cheap everything, + IPC
>>
>>60215749
ask your friend for compiler flags he used.
>>
>>60214550
>2.8ghz i7 (most likely has 3.2ghz turbo boost enabled as well)
>vs a sub-walmart-laptop-tier CPU

wow easiest troubleshooting ever
>>
Oh and one last thing: I now realize that when he told me that the processing was done (I asked him "hey, the terminal is not updating, doesn't that mean the processing is finished?" and he said "oh yes") he was wrong. what actually happened is, only the samples were loaded into memory, and he probably terminated the program while it was still processing the samples without realizing it, and the output file he showed me may have been a residue from an earlier run. (you know, it's kind of hard to judge whether a low-pass filter has done it's job correctly when you don't know what Cutoff frequency it's at). Come to think of it, the output of a filter that works by averaging values over 2 seconds should basically be a straight line with no components higher than 0.5 Hz.


So to recap: I'm retarded, my friend is retarded, and every single one of you is retarded
>>
Idk what the fuck others were thinking but this sounded more like a programming bug from the start. Why the fuck are people shitting on the processor for no reason?
>>
>>60215965
>>60216068
3 seconds vs 10 minutes = 200x difference you fucking retards
>>
>>60216396
Because the only thing people know on this board is which de/gpu/cpu/os to use and why yours is shit
>>
>>60216552
I want gookmoot to just end this all, already.

Hiro, if you're reading, wipe us all the fuck out right now.
>>
>>60216586
really the only problem is that people from /v/ use their computer to play video gayms all the time, and then society tells them that because they use their computer a lot, they must automatically know everything about computers.

So now you have a bunch of children screaming at each other every time nvidia or amd release a new graphics card or something
>>
>>60216271
> averaging values over 2 seconds should basically be a straight line with no components higher than 0.5 Hz.
except that's now how a moving average works you retard. it's not a brick-wall filter

l2signalprocessing101
>>
>>60216396
Anyway, the final result is, my implementation, using iostreams and a circular buffer turns out to be ~4 times slower compared to his implementation that uses a static array of ints, with the end result being 100% indistinguishable (as in, when you load both outputs into audacity, invert one of them and play, the output is a constant 0). His program uses 9 times more memory for obvious reasons, but how much is 4.7 MiB, in the modern day, really.

Other difference is that my code is more versatile, and imho, prettier. I wrote a ringmod and a delay by changing just one virtual function as well as the constructor for the class

</blogpost>
>>
>>60216654
When I'm going to be doing actual signal processing I'll just fuse a resistor and a capacitor together and it'll be great and analog pure warm hifi signals brah. Digital Sound is not real amirite
>>
File: 1493918607058.png (180KB, 546x535px) Image search: [Google]
1493918607058.png
180KB, 546x535px
>>60214550
>A4-5000
>Clockspeed: 1.5 GHz
>No of Cores: 4
>Typical TDP: 15 W
>>
>>60216947
Analog can never achieve a brick-wall filter. Such a filter requires anticausal response (sinc impulse response).

Furthermore your 1-resistor-1-cap filter will only achieve a single pole rolloff so you'll only get 20dB/decade and only 3db attenuation at your pole frequency.
>>
>>60217680
dude I know. I was hoping to attract the attention of the Audiopedophile crowd
>>
>>60214550
AVX
V
X
>>
>>60215593
>30 times slower than his computer
this is easily obtainable if you just chain a couple factors together

SIMD instructions, there's ~4x. pipelining, there's ~4x. your clock rate is 2x as slow, 4 * 4 * 2 = 32 and we're already there

i have no idea if these are the actual factors, to know that you have to benchmark. try perf, and if that doesn't work try likwid
Thread posts: 35
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.