Revision: 56828
          http://sourceforge.net/p/brlcad/code/56828
Author:   brlcad
Date:     2013-08-14 06:15:22 +0000 (Wed, 14 Aug 2013)
Log Message:
-----------
boom, nearly double performance back to before 32-bit fix performance levels by 
eliminating unnecessary memory-zeroing.  profile showed this hot spot taking up 
around 30% of time on mac 64-bit.  unnecessary because 'nhits' and 'stack_ind' 
track how many are set.

Modified Paths:
--------------
    brlcad/trunk/src/librt/primitives/bot/btg.c
    brlcad/trunk/src/librt/primitives/bot/tie.c

Modified: brlcad/trunk/src/librt/primitives/bot/btg.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bot/btg.c 2013-08-14 05:59:36 UTC (rev 
56827)
+++ brlcad/trunk/src/librt/primitives/bot/btg.c 2013-08-14 06:15:22 UTC (rev 
56828)
@@ -182,13 +182,12 @@
     int i;
     fastf_t dirlen;
 
-    memset((void *)&hitdata, 0, sizeof(hitdata));
-
     bot = (struct bot_specific *)stp->st_specific;
     tie = (struct tie_s *)bot->tie;
 
     hitdata.nhits = 0;
     hitdata.rp = &ap->a_ray;
+    /* do not need to init 'hits' and 'ts', tracked by 'nhits' */
 
     /* small backout applied to ray origin */
     dirlen = MAGSQ(rp->r_dir);

Modified: brlcad/trunk/src/librt/primitives/bot/tie.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bot/tie.c 2013-08-14 05:59:36 UTC (rev 
56827)
+++ brlcad/trunk/src/librt/primitives/bot/tie.c 2013-08-14 06:15:22 UTC (rev 
56828)
@@ -221,8 +221,6 @@
     int ab[3], split, stack_ind;
     void *result;
 
-    memset(stack, 0, sizeof(stack));
-
     if (!tie->kdtree)
        return NULL;
 
@@ -257,11 +255,6 @@
     do {
        near = stack[stack_ind].near;
        far = stack[stack_ind].far;
-
-       /*
-        * Take the pointer from stack[stack_ind] and remove lower pts bits 
used to store data to
-        * give a valid ptr address.
-        */
        node = stack[stack_ind].node;
        stack_ind--;
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to