Blog post "Faster Compilation for Delphi Win32 Generics in 10.1 Berlin" at http://blog.marcocantu.com/blog/2016-may-faster-generics-compilation.html

Blog post "Faster Compilation for Delphi Win32 Generics in 10.1 Berlin" at http://blog.marcocantu.com/blog/2016-may-faster-generics-compilation.html
http://blog.marcocantu.com/blog/2016-may-faster-generics-compilation.html

Comments

  1. Better compilation time is appreciated, but an order of magnitude more important to me is the time taken to run the code that the compiler outputs. I would be happy for the compilation process to be slower if the resulting code ran faster.

    ReplyDelete
  2. David Heffernan Both are important, I fully agree. Honestly, we see more complaints for the slow compiler than for the compiled code performance, weather we agree with that as a priority or not.

    ReplyDelete
  3. You've got to serve your market, I understand. Anyway, I'm sure you are aware of my performance oriented data point!

    ReplyDelete
  4. Javier Hernández  Can't you read? ;-) Marco says that the customer feedback from their end is that more customers care about compiler speed than care about the performance of the emitted code.

    ReplyDelete
  5. David Heffernan Improving the codegen is for sure much more expensive than integrating the concepts of one or more Compile Speed Pack (IDE Fix Pack) patches directly into the compiler.

    ReplyDelete
  6. I echo David Heffernan remarks. I'd love to see the code generation improved. I think the reason you're seeing more comments about compilation speed is because users can't easily compare the execution speed to that of other compilers. In the world of computer chess Delphi code is generally regarded as at least 30% slower than C++. I suspect it's close to half the speed. And that's integer manipulation. AFAIK there still isn't any floating point optimization done by the Delphi compiler. Am I correct in saying there hasn't been any significant code optimization since Delphi 2 (i.e. in the last 20 years)?

    ReplyDelete
  7. Marco Cantù A new compiler addressing better codegen could resolve this problem, for debug purposes you could rely on the current compiler that is the faster one, and for release purposes you could switch to the new compiler, in this way you has no problem about development productivity :D

    ReplyDelete
  8. The team worked and keeps working on both directions, as I wrote. The performance of the compiler with projects making a heavy use of generics was clearly a main issue, something worth mentioning in a specific blog post.

    ReplyDelete
  9. Marco Cantù Is there any realistic prospect of the Delphi Windows compilers improving the code that they produce for floating point code?

    ReplyDelete
  10. Floating point performance improvements are being discussed and on our internal plans. No ETA for now, though.

    ReplyDelete
  11. Marco Cantù As one of your users that does a lot with floating point, I'd like to contribute to any developments you might do in this area. If you are open to some external input do let me know.

    ReplyDelete
  12. Marco Cantù, May I take this chance to ask, is there any chance for EMBT to push Andy to release a new version of IDE Fix Pack, like provide a free license to him?

    ReplyDelete
  13. Javier Hernández I am not so eager to get rid of that "old" compiler. Despite of all its flaws that is one great compiler. I would like to see it being improved rather than ditched.

    ReplyDelete
  14. The C++ compilers have all moved to CLANG and LLVM infrastructure. Some of the Delphi compilers (the mobile ones) also use LLVM back-end and code generator.

    ReplyDelete
  15. At work, our programs do mostly one of three things: wait for user input, read or write files, communicate with the database server.

    I can only think of a few places in our code where we'd readily notice if the generated code would run an order of magnitude slower.

    That said, I'd like Delphi to fix some of the low-hanging performance-fruits. An "O2" option would be nice, for those who are willing to trade compile-time speed for run-time speed.

    ReplyDelete
  16. I also rate the importance of performance a magnitude higher than compilation speed. Is there a way to confirm whether actually there are more complaints about a slow compilation than performance?

    ReplyDelete
  17. Javier Hernández Whether keeping old compiler would be expensive or not is not something either one of us is capable of saying. And C++ compiler had quite different story behind.

    Just saying, be careful what you wish for. Compiler speed seems unimportant until you start twiddling thumbs waiting for something to compile.

    ReplyDelete
  18. Leif Uneus Mobile compilers are rather slow. Not that Android Studio or XCode are much better. But it is hard to give proper comparison.

    ReplyDelete
  19. Steve Maughan For sure about D2005 - inlining functions. Const parameters. In about D2005 timeframe Danny Thorpe write long answer about Delphi compiler optimization.

    ReplyDelete
  20. Dalija Prasnikar  It depends on your perspective. If you offered me my current program coded in Delphi, or coded in C++ then I would take C++ every time. Even though the compilation is much slower, the program itself would be much faster.

    My business is based on persuading people to buy my software. If I go to them and say, try this new version, it's slower than the old version, but I can compile it faster, what do you think they will say?

    Anyone for whom performance of executing code is remotely important will be prepared to trade significant compilation time for even small performance gains. I'd gladly accept compilation 3 times slower for a program that was 1.1 times faster, for instance.

    ReplyDelete
  21. Dalija Prasnikar You adapt. I coded C++ for 7 years after doing TP/Delphi for 10+ years. Annoying at first, but these days I can often find myself writing a dozen non-trivial procedures before hitting compile.

    Also, in debug mode the C++ compiler wasn't that slow. It was just with all the optimizations cranked to the max that you could take a lunch break while compiling.

    ReplyDelete
  22. I'd vote for codegen improvements, there's been very litte activity in that area for many years. I'm actually happy with compilation speed and I'd be prepared to trade compilation speed for codegen (optimisation levels would be awesome).

    ReplyDelete
  23. I am okey about the current compile time of mobile compilers :D A new feature I would love to see is be able to edit the code when compiling, it is possible in many other tools and would be a great addition as users could keep typing code when the previous code is compiled :D

    ReplyDelete
  24. Horácio Filho That already exists! In Tools > Options > Environment Options, turn on 'Background Compilation'. When you compile, the dialog will be semitransparent and in the corner of the screen, and you can continue typing in the code editor.

    ReplyDelete
  25. Javier Hernández They're not a problem because we have a really fast compiler, which is the entire point.  If the compiler got slow, compile times on large projects would be a problem.

    ReplyDelete
  26. Marco Cantù nice to have a look from you about how to solve the lack of idefix pack, now Andreas have not enough time to help EMB to made IDE more stable and usable. If EMB feel is a hack and is buggy, well, i think most of EMB customers will think don't. IDE FIX PACKS make IDE usable, stable and faster. Is a MUST.

    ReplyDelete
  27. David Heffernan I fully understand your standpoint. Even my perspective changes from one project to the other. I would love to have faster code and smaller exe sizes. But I am quite fond of speedy compiler too. How much, I am not quite sure. Until you give me dog slow compiler that produces superb code I cannot say whether that is what I really want or not.

    ReplyDelete
  28. Asbjørn Heid I don't have problems not hitting the compile while I write some background code logic. Unfortunately, when designing the UI things are a bit different. It is done by tweaking line or two at the time and compile speed counts here.

    Of course, since those tweaks are not full rebuilds probably even much slower compiler would do.

    ReplyDelete
  29. Dalija Prasnikar At least MSVC is quite quick when compiling "leaf code" (ie not messing with headers forcing a lot of recompilation), as long as link-time code-gen is disabled. Not much slower than Delphi really.

    ReplyDelete

Post a Comment