Here’s what I’m talking about I got this:
fseek( pChunk, (iCurChar < 31) ? ftell(pChunk)+((31-iCurChar)+1) : ftell(pChunk), 0 );
This is VITAL and basically if the condition is not met we shouldn’t move anywhere in the file, which would go easier on the resources having this ternary or making an if that doesn’t do basically nonsensical “fseek( ftell() )”?
I think the difference on modern machines is pretty much negligible but I’m really not sure what I should go for the resource management is pretty important here so I would go for as little as possible even if it’s negligible just in case. ThankS!
I looked at what people say about them and some of the opinions differ this case is pretty unique I think because there’s also an extra operation in play with the ternary ( the fseek to ftell ), I don’t know how big of a difference it will be and I have no experience in benchmarking whatsoever
STAHP is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.