Printing In Console Performance

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
TheScriptan
Citizen
Posts: 56
Joined: Wed Feb 27, 2013 7:53 pm

Printing In Console Performance

Post by TheScriptan »

I want to ask a simple question, does printing in console very often costs some performance? For example I have set up a bullet class and every time bullet gets out of the boundary I print that bullet got destroyed and destroy it afterwards?
User avatar
TomcisUMB
Prole
Posts: 9
Joined: Tue Apr 15, 2014 8:21 pm
Location: Vilnius, Lithuania

Re: Printing In Console Performance

Post by TomcisUMB »

Yes becuse it needs to check if it left boundry
TheScriptan
Citizen
Posts: 56
Joined: Wed Feb 27, 2013 7:53 pm

Re: Printing In Console Performance

Post by TheScriptan »

I check boundaries, because I want to delete the bullet when it's off the boundaries, I asked if command print(), cost performance if I use it very often (not in update or spamming loop or something like that). As I said I use print() statement before turret gets destroyed
WetDesertRock
Citizen
Posts: 67
Joined: Fri Mar 07, 2014 8:16 pm

Re: Printing In Console Performance

Post by WetDesertRock »

The occasional print won't do much, but if you print several times every frame you'll notice something.
User avatar
Jeeper
Party member
Posts: 611
Joined: Tue Mar 12, 2013 7:11 pm
Contact:

Re: Printing In Console Performance

Post by Jeeper »

Printing in the console should only be done for debugging etc, so when your game is done you remove the console. Why would a slight performance reduction be of any concern?
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests