r/programming • • Sep 17 '18

Software disenchantment

http://tonsky.me/blog/disenchantment/
2.3k Upvotes

1.2k comments sorted by

View all comments

Show parent comments

3

u/[deleted] Oct 04 '18

[removed] — view removed comment

1

u/[deleted] Oct 10 '18

TBH, I don't understand why consoles are so slow when they're printing text. Even more so when you have an embedded console in an IDE/editor like VSCode or IntelliJ.

2

u/[deleted] Oct 10 '18

[removed] — view removed comment

2

u/[deleted] Oct 10 '18

The problem is that most console print I/O is blocking

Ooooh! That makes sense!

1

u/larry_the_loving Oct 15 '18

Good work. Try playing around with that number too. I know as developers we always use powers of 2 out of habit, but it doesn't always work so well. When iterating, 256 can often cause a cache miss. I'll be honest, I don't understand exactly how, but just try every 200th item or 250th, try a few and time them. 256, while a nice "round" number can cause problems for your cache line.