Improving IO Speed

Marc Schütz" <schuetzm at gmx.net> Marc Schütz" <schuetzm at gmx.net>
Fri Mar 21 11:15:40 PDT 2014


On Friday, 14 March 2014 at 18:00:58 UTC, TJB wrote:
> align(1) struct TaqIdx
> {
>   align(1) char[10] symbol;
>   align(1) int tdate;
>   align(1) int begrec;
>   align(1) int endrec;
> }

Won't help with speed, but you can write it with less repetition:

align(1) struct TaqIdx
{
align(1):
   char[10] symbol;
   int tdate;
   int begrec;
   int endrec;
}

The outer align(1) is still necessary to avoid the padding.


More information about the Digitalmars-d-learn mailing list