> For the complete documentation index, see [llms.txt](https://docs-v3.activeloop.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-v3.activeloop.ai/v3.0.15/performant-dataloader.md).

# Performant Dataloader (Beta)

## How to use Deep Lake's performant Dataloader built and optimized in C++

Deep Lake offers an Alpha version of its dataloader that was build and optimized in C++. The new dataloader is 2-3X faster in many applications, but since it is an experimental state, is not as reliable as the pure-python dataloader described [here](/v3.0.15/getting-started/connecting-to-ml-frameworks.md).&#x20;

Both dataloaders can be used interchangeably, and their syntax varies as shown below&#x20;

### Pure-Python Dataloader

```python
train_loader = ds_train.pytorch(num_workers = 8,
                                transform = transform, 
                                batch_size = 32,
                                tensors=['images', 'labels'],
                                shuffle = True)
```

### C++ Dataloader

{% hint style="danger" %}
The C++ dataloader is currently available only on Linux machines. It also returns image tensors as PIL images, not numpy arrays (like the python dataloader).

Starting from deeplake 3.1.0, the C++ dataloader will require the dataset's parent organization to be on a Growth of Enterprise plan. Querying Activeloop datasets will be enabled for everyone.&#x20;
{% endhint %}

<pre class="language-python"><code class="lang-python">from deeplake.experimental import dataloader
<strong>
</strong><strong>train_loader = dataloader(ds)\
</strong>                .transform(transform)\
                .batch(32)\
                .shuffle()\
                .pytorch(tensors=['images', 'labels'], num_workers = 8)
</code></pre>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-v3.activeloop.ai/v3.0.15/performant-dataloader.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
