# Improve performance of this index creation and accessing code

**URL:** <https://discourse.julialang.org/t/improve-performance-of-this-index-creation-and-accessing-code/134235>\
**Category:** Performance\
**Tags:** indexing, rounding\
**Created:** [November 30, 2025, 3:59pm UTC](https://discourse.julialang.org/t/improve-performance-of-this-index-creation-and-accessing-code/134235 "2025-11-30T15:59:23Z")\
**Posts on this page:** 1\
**Showing post:** 51

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [December 28, 2025, 12:41pm UTC](https://discourse.julialang.org/t/improve-performance-of-this-index-creation-and-accessing-code/134235/51 "2025-12-28T12:41:18Z")

</div>

Hi @eldee I am trying to 3D plot Black Hole simulation data. I am converting Kerr-Schild coordinates to Cartesian coordinates.  
`Bp` is magnetic field ratio(poloidal/toroidal). I need `log.(r)` in interpolate because r(geometric series) is not uniform so i have to make it uniform.

> [@eldee](#):
>
> Why ‘smooth’ `θ_eval`, but not `ϕ_eval`?

I could not notice [improvement in plot](https://discourse.julialang.org/t/discretised-colors-in-3d-plot-due-to-sampling/134632) on making changes in `ϕ_eval`.  
`a` is spin of Black hole. Yes, We need extrapolate as we are interpolating on `cx_all` which are location where color is assigned and calculating `cxe_all`. Although extrapolation can be ignored if i tolerate little bit error/approximation in color position and interpolate directly on `cx_all`.

> [@eldee](#):
>
> Why doesn’t every `b`-iteration overwrite some (or all) of the `field[ix, iy, iz]` values from a ‘previous’ iteration?

That i too don’t understand but it gives correct plot as i have matched it with scatter plot and every feature looks same.

---

_[View the full topic](https://discourse.julialang.org/t/improve-performance-of-this-index-creation-and-accessing-code/134235)._
