Announcement

Collapse
No announcement yet.

fastest number cruncher?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    I just bought PBCC ver 6 and it will be worth it even for a 10% speed improvement. Thanks to everyone. I now have to convert 8000 lines of code (much of it badly written) so I may not survive the process. I have made a start and now is a good time to consider the program structure. Given the interest in speed, is there any program structure to avoid/use? Writing to the screen (minimising of) has been mentioned in this thread but I guess there are other traps.

    Someone, who knows more about this than I do, said in a corporate environment you plan out the structure for months and then writing the code is simple as you already know what to do. This is a really weird concept for me. I expect there is a procedure/framework to use when planning. Is there a reference somewhere that provides examples? My program is quite simple and the problem may be the corporate models are too big/complex to follow.

    Comment


    • #22
      Peter,
      it's probably better to rewrite you program in a way you're comfortable with and get it working then ask for advice of how to speed up the critical parts. There's lots of things you could try but most might not apply to your program. If you have a working program and post your specific problem then you will likely get more specific and useful advice.

      General advice for speeding things up has been asked for before e.g.:
      http://www.powerbasic.com/support/pb...ad.php?t=47989
      http://www.powerbasic.com/support/pb...ad.php?t=11567

      Paul.

      Comment


      • #23
        >and get it working then ask for advice of how to speed up the critical parts.

        I think I am getting through to some people. I'll declare victory now.
        Michael Mattias
        Tal Systems Inc. (retired)
        Racine WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #24
          Originally posted by Petr Schreiber jr View Post
          I posted an starter example on using this technology from PowerBASIC sometime ago:
          http://www.jose.it-berater.org/smffo...p?topic=3327.0

          Petr
          That example seems to be missing the CL.INC file. Is that available anywhere?
          Michael Burns

          Comment


          • #25
            Code:
            'Where speedup = 1/((P/N) + S)
            'The maximum speed increase for 2 cores is speedup = ~1.98 times no matter how many threads are used.
            'Given: P = 99% Code parallelized
            '       S = 01% Code serialized
            '       N = 2 system cores
            
            'The maximum speed increase for 4 cores is speedup = ~3.88 times no matter how many threads are used.
            'Given: P = 99% Code parallelized
            '       S = 01% Code serialized
            '       N = 4 system cores
            
            'The maximum speed increase for 8 cores is speedup = ~7.476 times no matter how many threads are used.
            'Given: P = 99% Code parallelized
            '       S = 01% Code serialized
            '       N = 8 system cores

            Comment

            Working...
            X