A really quick use of Perlin Noise in world heightmaps - made just for the example.
- World is divided to 16x16 chunks (world size is 256).
- Each "cube" is 1x1.
- Chunk will only draw faces that are visible to the player (even between other chunks).
Full source: https://git.kask.fi/kask/PerlinWorldGen
There are many ways to improve performance. Fix the chunk updates on player movement and implement object pooling. Multithreading (geometry calculation on Chunk )is easy to add. You can also spawn only few chunks per frame (by using Queue)