[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] [patch] pagetable cleanups



 
> Because you cannot rely on the optimization, structs are not 
> typically returned by value.  Since this is so rarely done, 
> I'd argue it's more readable to pass a struct as an argument 
> (the fact that some people don't even realize it's possible 
> should support that). 

Gcc optimises the case where an 8 byte struct is returned from an inline
function just fine. It's far more likely to generate poor code when you
start passing values by reference. I don't buy your readability
argument: Being able to use the return value in expressions can make
code rather easier to grock. 

Ian

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.