[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - Memcpy slow compared to manual copy of data

Memcpy slow compared to manual copy of data

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

Memcpy slow compared to manual copy of data

Postby pascallj » Thu Jun 15, 2017 12:40 pm

pascallj
 
Posts: 5
Joined: Thu Jun 15, 2017 12:19 pm

Re: Memcpy slow compared to manual copy of data

Postby pascallj » Thu Jun 15, 2017 2:03 pm

Think I got at least one problem figured out. If copy memcpy from into my own code, it results in roughly the same benchmark values as when I adapt my own code to copy 8 instead of 64 bits. So I guess the low memcpy performance comes from the standard C library being in the external dram instead of SRAM.

However I am still wondering why O3 will, instead if optimizing my code for speed, makes my code so much slower.
pascallj
 
Posts: 5
Joined: Thu Jun 15, 2017 12:19 pm

Re: Memcpy slow compared to manual copy of data

Postby sebraa » Thu Jun 15, 2017 4:06 pm

Do not execute any code from external memory if you want reasonable performance. Use internal.ldf as linker script.
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm

Re: Memcpy slow compared to manual copy of data

Postby pascallj » Thu Jun 15, 2017 4:23 pm

pascallj
 
Posts: 5
Joined: Thu Jun 15, 2017 12:19 pm

Re: Memcpy slow compared to manual copy of data

Postby jar » Thu Jun 15, 2017 5:08 pm

You can use my shmemx_memcy routine if you need best performance. Nothing else beats it while also handling address misalignment.
https://github.com/USArmyResearchLab/op ... x_memcpy.c
User avatar
jar
 
Posts: 295
Joined: Mon Dec 17, 2012 3:27 am

Re: Memcpy slow compared to manual copy of data

Postby pascallj » Thu Jun 15, 2017 5:25 pm

Thanks! I am using the Parallella board for my bachelor thesis so maybe it is nice to compare the results I finally get with your implementation.
pascallj
 
Posts: 5
Joined: Thu Jun 15, 2017 12:19 pm

Re: Memcpy slow compared to manual copy of data

Postby GreggChandler » Fri Jun 16, 2017 7:44 am

GreggChandler
 
Posts: 66
Joined: Sun Feb 12, 2017 1:56 am

Re: Memcpy slow compared to manual copy of data

Postby GreggChandler » Fri Jun 16, 2017 8:46 am

GreggChandler
 
Posts: 66
Joined: Sun Feb 12, 2017 1:56 am

Re: Memcpy slow compared to manual copy of data

Postby sebraa » Fri Jun 16, 2017 12:16 pm

sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm

Re: Memcpy slow compared to manual copy of data

Postby DonQuichotte » Fri Jun 16, 2017 3:09 pm

Totally agree with sebraa.
Performance is my only goal.
Use internal.ldf or nothing.
Avoid using the libraries as much as possible.
gcc bit handling emulation for example is really poor, I had to replace them with my own (popcount, clz).
User avatar
DonQuichotte
 
Posts: 46
Joined: Fri Apr 29, 2016 9:58 pm

Next

Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 5 guests

cron