Does "Remove Array Bounds Checks" perform on RUN-TIME?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Does "Remove Array Bounds Checks" perform on RUN-TIME?

  1. #1
    Rattagarn V. Guest

    Does "Remove Array Bounds Checks" perform on RUN-TIME?


    Hi,

    I suspected in the compile tab in the project properties sheet. In advanced
    optimizations, the Remove Array Bounds Checks option on that page means that
    VB will check every time each element in array is accessed while the program
    is running. Is my understand correct? Is it the same as Java? Because
    Java will check all arrays while your program is running. This will slow
    down the application. If my application loops the array of 10000 integer
    elements, Java VM will check all 10000 integers.
    Please ******** this in VB for me.

    Best Regards,
    Rattagarn V.

  2. #2
    Guest

    Re: Does "Remove Array Bounds Checks" perform on RUN-TIME?

    You've got it. If you check this box, then your _compiled_ program will
    skip this checks, which can result in a speed increase. It does not affect
    your program running in the IDE.

    "Rattagarn V." <rattagarn@hotmail.com> wrote in message
    news:395b7bd5$1@news.devx.com...
    >
    > Hi,
    >
    > I suspected in the compile tab in the project properties sheet. In

    advanced
    > optimizations, the Remove Array Bounds Checks option on that page means

    that
    > VB will check every time each element in array is accessed while the

    program
    > is running. Is my understand correct? Is it the same as Java? Because
    > Java will check all arrays while your program is running. This will slow
    > down the application. If my application loops the array of 10000 integer
    > elements, Java VM will check all 10000 integers.
    > Please ******** this in VB for me.
    >
    > Best Regards,
    > Rattagarn V.




  3. #3
    Michael Culley Guest

    Re: Does "Remove Array Bounds Checks" perform on RUN-TIME?


    I'd strongly recommend not using this feature. From my understanding, your
    VB app will give a GPF if there is an error in your code. So your error handling
    code won't work and you will have no idea where the error is.

    The exception where I would use this is when speed was critical and in this
    case I would put the routines in a seperate dll so that only those routines
    where affected. Maybe in VB7 we could specify these parameters for each routine
    or maybe even each line of code.

    Michael Culley

    <*> wrote:
    >You've got it. If you check this box, then your _compiled_ program will
    >skip this checks, which can result in a speed increase. It does not affect
    >your program running in the IDE.
    >
    >"Rattagarn V." <rattagarn@hotmail.com> wrote in message
    >news:395b7bd5$1@news.devx.com...
    >>
    >> Hi,
    >>
    >> I suspected in the compile tab in the project properties sheet. In

    >advanced
    >> optimizations, the Remove Array Bounds Checks option on that page means

    >that
    >> VB will check every time each element in array is accessed while the

    >program
    >> is running. Is my understand correct? Is it the same as Java? Because
    >> Java will check all arrays while your program is running. This will

    slow
    >> down the application. If my application loops the array of 10000 integer
    >> elements, Java VM will check all 10000 integers.
    >> Please ******** this in VB for me.
    >>
    >> Best Regards,
    >> Rattagarn V.

    >
    >



  4. #4
    Anthony Jones Guest

    Re: Does "Remove Array Bounds Checks" perform on RUN-TIME?

    >>
    From my understanding, your
    VB app will give a GPF if there is an error in your code.
    <<

    Of course, we can protect ourselves from this by installing an unhandled
    exception filter. A bigger problem is that the memory beyond the array may
    be valid, perhaps it may contain data for other variables, so there is no
    error just strange program behaviour.


    --
    Anthony Jones
    Secta Group Ltd




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center