Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Question Mesh.SetVertices slower with float3 input

Discussion in 'Graphics Dev Blitz Day 2023 - Q&A' started by DevDunk, May 25, 2023.

  1. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,234
    I am working on a bursted mesh slicer, and noticed that mesh.SetVertices is a lot slower if you input an array of float3 (0.57ms vs 0.12ms).
    Is there any way this can be improved? This is making it very hard to work with burst for me
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,234
    Turns out IL2CPP improved performance a lot
     
  3. Jebtor

    Jebtor

    Unity Technologies

    Joined:
    Apr 18, 2018
    Posts:
    111
    The timings mentioned (0.57ms vs 0.12ms) is only spent in mesh.SetVertices and does not capture anything else? With IL2CPP you do not see a difference?
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,234
    Yes, but with deep profiling enabled.
    With IL2CPP it was so small I could not quickly find it, so it was a non issue for this.

    If you find this an interesting find I can post more info/make a bug report tomorrow
     
  5. Jebtor

    Jebtor

    Unity Technologies

    Joined:
    Apr 18, 2018
    Posts:
    111
    Always feel free to report a bug. Just to manage expectations; the case might get closed with a simple explanation or deprioritized to fix other bugs that have a higher user pain.
     
    DevDunk likes this.