User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Replacement memcpy

Thu Jul 19, 2012 10:55 pm

Bit of bad news here I'm afraid - it makes my BASIC interpreter go slower )-:

The test I was hoping to speed up is its sprite handling - it's all done in SDL using the SDL_Blit functions - which are effectively memory move functions. My generic sprite test animates 100 64x64 sprites on an 1280x1024 console at a rate of about 27 fps. With the LD_PRELOAD set for the new memcpy, the framerate drops to 23.

It's no biggie for this, but thought I'd let you know.

-Gordon
--
Gordons projects: https://projects.drogon.net/

User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Replacement memcpy

Thu Jul 19, 2012 11:18 pm

[email protected] wrote:Bit of bad news here I'm afraid - it makes my BASIC interpreter go slower )-:

The test I was hoping to speed up is its sprite handling - it's all done in SDL using the SDL_Blit functions - which are effectively memory move functions. My generic sprite test animates 100 64x64 sprites on an 1280x1024 console at a rate of about 27 fps. With the LD_PRELOAD set for the new memcpy, the framerate drops to 23.

It's no biggie for this, but thought I'd let you know.

-Gordon
Just a follow-up - code here:

mkdir rtb ; cd rtb
wget http://unicorn.drogon.net/rtb/rtb-armhf
wget http://unicorn.drogon.net/rtb/sprites.rtb
wget http://unicorn.drogon.net/rtb/test.bmp

run in console by ./rtb-armhf sprites

and it'll print fps top-left. hit ESCape to end, then you can go the LD_PRELOAD thing and try again...


-Gordon
--
Gordons projects: https://projects.drogon.net/

jvcleave
Posts: 36
Joined: Thu May 24, 2012 10:27 pm

Re: Replacement memcpy

Mon Mar 31, 2014 5:07 pm

Is this replacement used in Raspbian? When I look at my /etc/ld.so.preload the libcofi_rpi.so line is commented out

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
Contact: Website

Re: Replacement memcpy

Mon Mar 31, 2014 5:33 pm

In the Foundation Raspbian image, we use https://github.com/bavison/arm-mem/ which confusingly is still called libcofi_rpi.so as the switch was easier that way. I'm not sure why it's commented out in /etc/ld.so.preload for you - the standard image that you'll get off the downloads page has it there.

jvcleave
Posts: 36
Joined: Thu May 24, 2012 10:27 pm

Re: Replacement memcpy

Mon Mar 31, 2014 5:40 pm

I just realized that I had commented that line to get valgrind to work. :oops: Thanks for the update though!

Return to “General discussion”