Results 1 to 6 of 6

Thread: Take Advantage of 64bit processor?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2010
    Posts
    106

    Take Advantage of 64bit processor?

    Well how can I do this? So my app is faster?

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Take Advantage of 64bit processor?

    It wont make your app faster unless your app needs to use massive amounts of memory (e.g over 2 GB).

    Anyway, all you need to do to make your app 64 bit compatible is set the Target CPU Architecture to AnyCPU (or x64 if you want it to ONLY run on 64 bit operating systems). To do this just go to your Project Properties and click the Compile tab, then click the Advanced Compile Options button - in the new window that appears you will see Target CPU, just make sure that is set to AnyCPU.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: Take Advantage of 64bit processor?

    In general: 64bit <> Speed
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Take Advantage of 64bit processor?

    If you want to make your app faster then what you want to take advantage of is the fact that most modern CPUs are multi-core, not the fact that they're 64-bit. If your app runs multiple threads simultaneously then it can get a speed boost.

    One problem is determining where multi-threading will help. Over-use can actually make your app slower and most apps will not need more than one thing done at a time for most, or even all, of the time.

    The other problem is the complexity associated with multi-threading. Running multiple threads simultaneously makes introducing bugs easier and makes finding and fixing them harder. Some options for implementing multi-threading simply include the BackgroundWorker class, PLINQ and the members of the System.Threading.Tasks namespace.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Take Advantage of 64bit processor?

    In addition to the points raised above, in most cases the speed of an app can be improved (sometimes very dramatically) without looking for something outside of the existing code to help - but by optimising the code you have already got.

    Optimising code is about finding out which parts of the code are noticeably slow (and/or use too much memory), then working out how to achieve the same thing in a more efficient way. What improvements you can make depend on the circumstances, but include things like using a different function to get equivalent info, pre-calculating a value before a loop rather than inside it, and even re-designing the methodology of the routine.

    Just because code produces the right result, it doesn't mean that there aren't aspects of it that are less than ideal, and make it take extra time to run.

  6. #6
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Take Advantage of 64bit processor?

    See which part of your code is slow and then try to determine which particular operation is taking time.
    Check your loops - maybe some unnecessary work which is only required to run once is performed within a loop, etc. Try to minimize I/O operations, cache your frequently used data in local variables, etc. Operations with strings are the slowest - try to minimize them and store intermediate results in variables. Do not perform the same operation twice. You have 4Gb of virtual memory at your disposal - do not be afraid to declare an additional variable (outside loops if possible). There are usually hundreds of things that can be improved/optimized.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width