Uploaded image for project: 'Swift'
  1. Swift
  2. SR-5669

Latent constraint solver performance bug

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Invalid
    • Component/s: Compiler
    • Labels:
      None
    • Environment:

      ToT swift compiler

      Description

      The following code demonstrates a massive performance bug in the constraint solver:

      var px : Int = 0
      var py : Int = 1
      var sx : Int = 0
      var sy : Int = 1
      // SLOW:
      let _ : Double = (px-sx)*(px-sx) + (py-sy)*(py-sy)
      // FAST workaround:
      let _ : Double = Double((px-sx)*(px-sx) + (py-sy)*(py-sy))
      

        Attachments

          Activity

            People

            Assignee:
            zarzycki David Zarzycki
            Reporter:
            zarzycki David Zarzycki
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: