Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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,971
    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,971
    Turns out IL2CPP improved performance a lot
     
  3. Jebtor

    Jebtor

    Unity Technologies

    Joined:
    Apr 18, 2018
    Posts:
    113
    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,971
    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:
    113
    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.