Hacker News new | ask | show | jobs
by lmm 3350 days ago
If you're not interested in a constructive conversation then don't comment in the first place.

If I've misunderstood what's going on with C then by all means tell me what does happen. To the best of my knowledge, if we're talking about 8 same-typed coordinates then there's no alignment/struct-packing issue, so whether you have 8 named doubles (say) or a struct with 8 double members (or indeed an array of 8 doubles), the in-memory representation on the stack is going to be the same; function calling convention is platform-specific but could easily have the same behaviour for the struct vs the named doubles (an array would be different in that case since you can't pass them by value). If that's wrong then talk constructively about what does happen.

> you want to load your 8-dimensional points from a file, where else could you possibly be getting them?

My point wasn't that you want to load them from a file, it's that it would be rare to want to have a point literal directly in your source. But why let that stop you leaping to a good ad hominem?

1 comments

Function calls pass parameters in registers if they're small enough.