On Thursday, 15 March 2018 at 23:15:47 UTC, Cecil Ward wrote:
On Thursday, 15 March 2018 at 23:14:14 UTC, Cecil Ward wrote:
On Tuesday, 2 January 2018 at 18:21:13 UTC, Tim Hsu wrote:
[...]
U
or even 'I' will be delighted to take a look.
Also link time optimisation and whole program optimi
On Thursday, 15 March 2018 at 23:14:14 UTC, Cecil Ward wrote:
On Tuesday, 2 January 2018 at 18:21:13 UTC, Tim Hsu wrote:
[...]
U
or even 'I' will be delighted to take a look.
On Tuesday, 2 January 2018 at 18:21:13 UTC, Tim Hsu wrote:
I am creating Vector3 structure. I use struct to avoid GC.
However, struct will be copied when passed as parameter to
function
struct Ray {
Vector3f origin;
Vector3f dir;
@nogc @system
this(Vector3f *origin, Vector3f
Am Wed, 3 Jan 2018 10:57:13 -0800
schrieb Ali Çehreli :
> On 01/03/2018 10:40 AM, Patrick Schluter wrote:
> > On Tuesday, 2 January 2018 at 23:27:22 UTC, H. S. Teoh wrote:
> >>
> >> When it comes to optimization, there are 3 rules: profile, profile,
> >> profile. I used to heavily hand-"opt
On 2018-01-03 08:02, Tim Hsu wrote:
It needs some experiment.
This is the correct answer. Never assume anything about performance
before having tested it.
--
/Jacob Carlborg
On 01/03/2018 10:40 AM, Patrick Schluter wrote:
> On Tuesday, 2 January 2018 at 23:27:22 UTC, H. S. Teoh wrote:
>>
>> When it comes to optimization, there are 3 rules: profile, profile,
>> profile. I used to heavily hand-"optimize" my code a lot (I come from
>> a strong C/C++ background -- premat
On Tuesday, 2 January 2018 at 23:27:22 UTC, H. S. Teoh wrote:
When it comes to optimization, there are 3 rules: profile,
profile, profile. I used to heavily hand-"optimize" my code a
lot (I come from a strong C/C++ background -- premature
optimization seems to be a common malady among us in
On Wed, Jan 03, 2018 at 07:02:28AM +, Tim Hsu via Digitalmars-d-learn wrote:
> On Tuesday, 2 January 2018 at 22:49:20 UTC, Adam D. Ruppe wrote:
> > On Tuesday, 2 January 2018 at 22:17:14 UTC, Johan Engelen wrote:
> > > Pass the Vector3f by value.
> >
> > This is very frequently the correct ans
On Tuesday, 2 January 2018 at 22:49:20 UTC, Adam D. Ruppe wrote:
On Tuesday, 2 January 2018 at 22:17:14 UTC, Johan Engelen wrote:
Pass the Vector3f by value.
This is very frequently the correct answer to these questions!
Never assume ref is faster if speed matters - it may not be.
However s
On Tue, Jan 02, 2018 at 10:17:14PM +, Johan Engelen via Digitalmars-d-learn
wrote:
[...]
> Passing by pointer (ref is the same) has large downsides and is
> certainly not always fastest. For small structs and if copying is not
> semantically wrong, just pass by value.
+1.
> More important:
On Tuesday, January 02, 2018 22:49:20 Adam D. Ruppe via Digitalmars-d-learn
wrote:
> On Tuesday, 2 January 2018 at 22:17:14 UTC, Johan Engelen wrote:
> > Pass the Vector3f by value.
>
> This is very frequently the correct answer to these questions!
> Never assume ref is faster if speed matters - i
On Tuesday, 2 January 2018 at 18:21:13 UTC, Tim Hsu wrote:
I am creating Vector3 structure. I use struct to avoid GC.
However, struct will be copied when passed as parameter to
function
struct Ray {
Vector3f origin;
Vector3f dir;
@nogc @system
this(Vector3f *origin, Vector3f
On Tuesday, January 02, 2018 19:27:50 Igor Shirkalin via Digitalmars-d-learn
wrote:
> On Tuesday, 2 January 2018 at 18:45:48 UTC, Jonathan M Davis
>
> wrote:
> > [...]
>
> Smart optimizer should think for you without any "auto" private
> words if function is inlined. I mean LDC compiler first of a
On Tuesday, 2 January 2018 at 18:45:48 UTC, Jonathan M Davis
wrote:
[...]
Smart optimizer should think for you without any "auto" private
words if function is inlined. I mean LDC compiler first of all.
On Tuesday, 2 January 2018 at 18:21:13 UTC, Tim Hsu wrote:
I am creating Vector3 structure. I use struct to avoid GC.
However, struct will be copied when passed as parameter to
function
struct Ray {
Vector3f origin;
Vector3f dir;
@nogc @system
this(Vector3f *origin, Vector3f
On Tuesday, January 02, 2018 18:21:13 Tim Hsu via Digitalmars-d-learn wrote:
> I am creating Vector3 structure. I use struct to avoid GC.
> However, struct will be copied when passed as parameter to
> function
>
>
> struct Ray {
> Vector3f origin;
> Vector3f dir;
>
> @nogc @system
>
I am creating Vector3 structure. I use struct to avoid GC.
However, struct will be copied when passed as parameter to
function
struct Ray {
Vector3f origin;
Vector3f dir;
@nogc @system
this(Vector3f *origin, Vector3f *dir) {
this.origin = *origin;
this.dir = *d
17 matches
Mail list logo