A quick question writeline vs writebyte
Blitz3D Forums/Blitz3D Programming/A quick question writeline vs writebyte| 
 | ||
| Will the be a speed difference if I was going to send about 250 characters in either way? Or should i use something faster if anything.  I'll be using tcp streams. Thank you | 
| 
 | ||
| No idea, just try... MsStart% = Millisecs() ;do something here (you may want to repeat the operation 1000 times or more to be able to notice a difference in mstime...) MsTime% = Millisecs() - MsStart Debuglog(MsTime) | 
| 
 | ||
| How often will you do this operation? As a single op it will take less than a millisecond either way so unless you are doing lots .... optimise somewhere else. | 
| 
 | ||
| If you are using TCP streams then at that level any potential performance will likely be swallowed by the TCP protocols that favour compatibility over performance - if performance is a consideration you'd be better off looking at a solution using UDP. IIRC writeline has some basic formatting included that writebyte doesn't but the performance difference would depend a lot on the level and type of use. |