Super-aggressive mode

  1. ‹ Older
  2. 2 weeks ago

    Greg O

    Nov 30 Xojo Inc
    Edited 2 weeks ago

    Just to be clear, we're using all the optimizations that we have empirically determined are safe to use that do not break your code. We spent many weeks testing various combinations to determine which could be used without wrecking the resulting executable. This included loop unrolling which is usually safe but not always safe. Some tests resulted in compile times measured in days. One of which resulted in a compile that was measured in weeks. Every test of different optimization settings was tested using our compiler verification test suite so we could be 100% sure that the resulting executable was in fact functioning as expected.

  3. Derek D

    Nov 30 Pre-Release Testers Newnan, GA. USA

    Put me on the side of 'safe' and 'app runs correctly' rather than the '1/2 second faster but takes hours and might not work' camp. :)

  4. Robert W

    Nov 30 Western Canada

    @Greg OLone If you want that level of control, write a plugin.

    I was only kidding, but now you've got me thinking. I hate when that happens!

  5. Bob K

    Nov 30 Pre-Release Testers, Xojo Pro Kansas City

    So we're getting the "passive - aggressive" compiler mode then? :)

  6. Rick A

    Nov 30 (Brazil. GMT-3:00)

    @Robert W New feature request: Allow inline assembly language. :)

    That's not multi-platform portable (ARM, x86, etc), but... Inline Clang is.

    Dim i As Integer = 0

    #Clang
    extern int i; // defined outside this inline Clang
    for (int c=0; c<3; c++) i++;
    #EndClang

    Msgbox "i = " + Str(i)

  7. Rick A

    Nov 30 (Brazil. GMT-3:00)

    @Greg OLone If you want that level of control, write a plugin.

    That will add a vast overhead (loading, calling, passing parameters, receiving data back) and complexity to devs. Not really useful for simple unsafe tricks squeezing bits and milliseconds inside (inline) Xojo code.

  8. Greg O

    Nov 30 Xojo Inc

    @Rick A Not really useful for simple unsafe tricks squeezing bits and milliseconds inside (inline) Xojo code.

    But that's the thing. Xojo is not about allowing "simple unsafe tricks". We go to great lengths to make it so you can't shoot yourself in the foot, so if you really think you need to squeeze every little bit of speed from a complex mathematical formula, you should write a plugin to do it.

  9. Rick A

    Nov 30 (Brazil. GMT-3:00)
    Edited 2 weeks ago

    @Greg OLone if you really think you need to squeeze every little bit of speed from a complex mathematical formula, you should write a plugin to do it.

    Sometimes we just need some matrix thing mixing bits and sending it out to some chip *inline* as fast as possible, a "simple" functionality that would be a shame to write a plugin with someone else's external C compiler, just for such thing.

    I do accept, and I feel, that your major real concern, is that introducing such thing in the language will have a *cost*. A cost of time and complexity, that you guys don't want to face anytime soon.

  10. Michael D

    Nov 30 Pre-Release Testers, Xojo Pro

    @Greg OLone One of which resulted in a compile that was measured in weeks.

    The intern on that gig had a sweet job! Boss: (walking in) "what you doing now?" Intern: (quickly hides XKCD window) "Still Compiling!"

  11. Sam R

    Nov 30 Pre-Release Testers, Xojo Pro Hengchun, Pingtung, Taiwan

    @Rick A That's not multi-platform portable (ARM, x86, etc), but... Inline Clang is.

    So is GLSL, you can write it inline (in a string), then create a CIKernel from it and execute it on the GPU, or use multi-threaded CPU processing.

    You'd have to create a memoryblock that represents a picture and use the 'pixel' values as your source (some can be passed directly to the CIKernel), then render it out to a memoryblock and extract the values from a pixel. You'll be limited to just Uint8, Uint16, half float or single.

    Apple makes this is easy (ha!) with Core Image, while I know GLSL is portable, I've never tried it on other platforms.

  12. Rick A

    Nov 30 (Brazil. GMT-3:00)
    Edited 2 weeks ago

    GLSL is a non-precompiled shader language with a very specific and limited domain. Not a lower level, general purpose, unsafe, almost unlimited language, used to insert near to the metal code, inline, mixed with the higher level, safer, more limited, language.

  13. Sam R

    Dec 1 Pre-Release Testers, Xojo Pro Hengchun, Pingtung, Taiwan

    @Rick A GLSL is a non-precompiled shader language with a very specific and limited domain. Not a lower level, general purpose, unsafe, almost unlimited language, used to insert near to the metal code, inline, mixed with the higher level, safer, more limited, language.

    I realize that it's not an exact match, just that it is something you can do today, providing the circumstance are suitable. What I don't understand is how the GPU can be faster, with non-precompiled code than a compiled application running across multiple cores.

    For example, in my tests the other day, rendering a 12 mpx (128-Bit) image took 12 seconds on the GPU (when breaking it down into multiple mini renders), yet when done on an 8-core processor (same machine and the same mini-renders), it took 44 seconds with the application utilizing almost 800% CPU. It's such a huge difference.

  14. last week

    John J

    Dec 3 Pre-Release Testers, Xojo Pro Cleveland, Ohio

    @Bob K So we're getting the "passive - aggressive" compiler mode then? :)

    FTR this is the best comment I have ever read on this forum, so perfect.

  15. 5 days ago

    Thomas R

    Dec 7 Europe, France, Besancon

    I develop 11 apps with xojo in my sparetime. I built 2 of them in agressive mode just to see (usually I build in default).
    In the first app, I tested the rotate of a picture 90°. I use a method I found here in the forum, I have two loops which invert coordinate of each pixel. I didn't see any difference with normal mode.
    In the second app which synchronize 2 folders, I loop recursively in 2 folders (Source and Target) and I compare name and modification date of each file. I didn't see any difference either. (I didn't test the copy time as I didn't copy any file, this time is limited by disk speed).

    The only difference I noticed is the build time. I do not need more speed, I'm happy with default optimization. I did a test just to see and I'm surprise there is no difference. Maybe it does optimize other kind of process?

  16. Kem T

    Dec 7 Pre-Release Testers, Xojo Pro, XDC Speakers New York

    My Bcrypt test code, in aggressive move, takes about 280 ms. In moderate, it takes about 330 ms.

    In default, it takes 3-4 seconds, so yes, for some code it can make a huge difference.

  17. Ramon S

    Dec 7 Pre-Release Testers, Xojo Pro UPC, Europe (Barcelona, Spain)

    @Kem T My Bcrypt test code, in aggressive move, takes about 280 ms. In moderate, it takes about 330 ms.

    In default, it takes 3-4 seconds, so yes, for some code it can make a huge difference.

    My main application has an important use of numeric analysis (matrix analysis) and with aggressive mode is about eight times faster than with normal mode. Waiting 1 minute for the result is something bearable, but waiting 8 minutes is impossible. I agree that aggressive mode can make a huge difference.

  18. James S

    Dec 7 Pre-Release Testers, Xojo Pro

    I vote for the opposite option ;) A super fast compile mode that doesn’t do any of that stuff so that when i’m doing iterative debugging I don’t have to wait so long between hitting run and having anything happen ;)

  19. Kem T

    Dec 7 Pre-Release Testers, Xojo Pro, XDC Speakers New York

    These are not mutually exclusive.

  20. 3 days ago

    Rick A

    Dec 9 (Brazil. GMT-3:00)
    Edited 3 days ago

    @Sam R I realize that it's not an exact match, just that it is something you can do today...

    In Windows? In Linux? In Android? Regardless checking if the underlying hardware have a GPU? To pre-process vectors of numbers and strings, order, and filter then WHILE sending data to a non-graphical IoT device WHILE reading changing bits of status from the device?

    As I said, GLSL, when present, works for a very specific and limited domain. I think that as you work tirelessly with Macs and graphics, your mind is working much in focus with the subject. And I say all this with a HUGE respect for your work, I hope no one read my words in a bad tone. :D

  21. yesterday

or Sign Up to reply!