Frequently Asked Questions > Writing Better and Faster Scripts > How To Make It Faster? >

# Dice your data into smaller pieces

MAXScript FAQ > How To Make It Faster> Dice your data into smaller pieces

If you are sorting, searching or correlating data within a large array, you'll get there much faster by cutting it up into smaller pieces, then maybe cutting again. If you're trying to find the closest neighbors of each point3, for example, you would want to dice the original array into a 3D grid of spatial subdivisions.

Previous Tip

Cache freqeuntly used functions and objects

Next Tip

Use bitArrays instead of Arrays when possible