TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Tabs slower than spaces in Firefox

179 点作者 emilong将近 9 年前

8 条评论

peterkelly将近 9 年前
I&#x27;m going to use this as fodder next time I get into an argument with someone about why spaces are better than tabs when writing code.<p>Or maybe I&#x27;ve just been watching too much silicon valley...
评论 #12120083 未加载
评论 #12120367 未加载
评论 #12124369 未加载
评论 #12120144 未加载
评论 #12120067 未加载
rosstex将近 9 年前
From the comments, it looks like there&#x27;s an &quot;optimization&quot; that kicks in when a function is under 100 characters long. It seems that optimization is backfiring and actually making a tabbed function slower.
评论 #12120003 未加载
评论 #12120133 未加载
评论 #12121038 未加载
gnicholas将近 9 年前
Read the title and thought it had to do with tabbed browsing versus using different Spaces in OS X.
db48x将近 9 年前
This is great bug, right up there with the Dwarf Fortress bug that involved a dwarf planting a bed in a farm plot.
评论 #12120068 未加载
Gonzih将近 9 年前
Tested in ff 47 on linux, same result in both cases (0). Am I missing here something?
评论 #12121142 未加载
Jean-Philipe将近 9 年前
Now, can we please have a bug that punishes the use of semicolons?
评论 #12122127 未加载
评论 #12122410 未加载
评论 #12121991 未加载
mk3将近 9 年前
This reminds me of &quot;Silicon Valley&quot; episode whent there was TABS vs. SPACES fight :)
kazinator将近 9 年前
Anyone who makes a language in which the performance of a call to previously processed code depends on its original whitespace should immediately be stripped of their CS degree, if they even have one.<p>If some decision depends on the size of a function, that size should be measured over the parsed code: number of nodes in the abstract syntax tree or whatever. This should be obvious to everyone by around the end of their second year of school. A function isn&#x27;t larger if we give it wider indentation with more spaces, or replace its local variables with ones having longer names.
评论 #12121477 未加载
评论 #12128688 未加载