Live data from Hacker News

Main is usually a function – when is it not?

jroweboy.github.io

61–62 of 62 posts

Re: Main is usually a function – when is it not?

#61
post #45

Earlier quoted context omitted.

Not at all; TAs are paid poorly, have other more interesting work (i.e., their research) to do, and spending the time to deal with 'clever' is not a good usage of time. Sure the student learnt more, but that doesn't mean this is what they should have handed in. Have fun on your own time, but don't waste the TAs time.

We might have to agree to disagree. If TAs aren't interested in students diving deeper into the course material then I'm not sure they should be paid at all. But perhaps the less radical approach would be to pay them enough such that they can take the time to judge the work on it's merit.

I'm fairly sure that executing arrays is not part of the course material.

Re: Main is usually a function – when is it not?

#62
post #60

Earlier quoted context omitted.

It's not bizarre: inline asm hurts performance and requires more effort from compiler authors than is worth it in our modern age of intrinsics.

I admit I'm not too familiar with the old MSVC inline assembly system, but the way GCC/Clang do it certainly allows emitting identical code to what you can get with intrinsics, although using naive constraints might hurt you. However, the main reason I personally use inline asm is not for performance, but to access instructions which are not provided as intrinsics or require special register handling. For example, I…

Theoretically they lead to identical code, but I believe a block of inline ASM results in constraints on surrounding code and prevents some types of compiler optimisation.
Post reply on HN