digitalmars.D - Again struct initialization
- Leopold Walkling (12/12) Dec 23 2006 I've asked for this once but I didn't get satisfieing answers. My
- Daniel Keep (7/21) Dec 23 2006 Just a quick question: what compiler flags did you use, and what code
- Leopold Walkling (3/11) Dec 23 2006 I used -O -inline -release -profile and some of those build switches,
I've asked for this once but I didn't get satisfieing answers. My problem is this static opCall; I had to use the profiler in order to find the fastes implementation: the static keyword makes the creation of the return struct up to 200 times slower! I used obj2asm and the profiler to find out that the creation of the internal return value isn't "optimized away" at all. Another thing that hurts is that an easy operation like assignment/cast/initialization to a struct have to be implemented through an opCall; Why do I have to assign each value manually to a struct (if I don't/can't implement a static opCall) merry christmas! Leo
Dec 23 2006
Leopold Walkling wrote:I've asked for this once but I didn't get satisfieing answers. My problem is this static opCall; I had to use the profiler in order to find the fastes implementation: the static keyword makes the creation of the return struct up to 200 times slower! I used obj2asm and the profiler to find out that the creation of the internal return value isn't "optimized away" at all. Another thing that hurts is that an easy operation like assignment/cast/initialization to a struct have to be implemented through an opCall; Why do I have to assign each value manually to a struct (if I don't/can't implement a static opCall) merry christmas! LeoJust a quick question: what compiler flags did you use, and what code did you use? I did some analysis on generated code a while back, and the different compiler flags produced wildly varying results. (Also: obj2asm? You're lucky. I had to use ndisasmw and magic numbers littered through the code :3) -- Daniel
Dec 23 2006
Daniel Keep schrieb:Just a quick question: what compiler flags did you use, and what code did you use? I did some analysis on generated code a while back, and the different compiler flags produced wildly varying results. (Also: obj2asm? You're lucky. I had to use ndisasmw and magic numbers littered through the code :3) -- DanielI used -O -inline -release -profile and some of those build switches, but those shouldn't change anything
Dec 23 2006