does white space slow down processing

前端 未结 5 747
孤独总比滥情好
孤独总比滥情好 2020-12-07 04:06

I have huge amounts of data to analyze, I tend to leave space between words or variable names as I write my code, So the question is, incases where efficiency is the number

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 04:41

    The only part this can affect is the parsing of the source code into tokens. I can't imagine that the difference in parsing time would be significant. However, you can eliminate this aspect by compiling the functions using the compile or cmpfun functions of the compiler package. Then the parsing is only done once and any whitespace difference can not affect execution time.

提交回复
热议问题