-
-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy table data directly to RAM using memcpy() #896
Labels
Comments
nesbox
added
enhancement
Improvement of existing feature or adding something new
API
Issues related to TIC80 API
labels
Jul 30, 2019
Sounds ok |
And maybe also from RAM? |
sure, both directions |
Thanks! Are you going to allow for both string and table |
I wrote a small test to measure -- title: game title
-- author: game developer
-- desc: short description
-- script: lua
x=96
y=24
tbl={}
-- check memcpy performance
start=time()
sz=240*136/2
for it=0,1000 do
for i=1,sz do tbl[i]=i end
end
memtime=time()-start
trace("memcpy pefr is: "..memtime.." ms",2)
-- check poke performance
start=time()
for it=0,1000 do
for i=1,sz do poke(i-1,tbl[i]) end
end
poketime=time()-start
trace("poke pefr is: "..poketime.." ms",3)
function TIC()
cls(13)
spr(1,x,y,14,3,0,0,2,2)
end and got results
which means |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
This would avoid thousands calling of the
pix()
api to render a game screen, for example.The text was updated successfully, but these errors were encountered: