View Single Post
Old 02 August 2021, 14:02   #206
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,627
Quote:
Originally Posted by Thomas Richter View Post
A typical use case is strlen:
Yep, and languages can keep count during string operations - this avoids running this counting loop even once (strlen simply loads the count attached to the string and returns.)

It would be actually be interesting with similar cases where a chunk of code can be completely omitted by planning ahead!
Photon is online now  
 
Page generated in 0.04301 seconds with 10 queries