Optimize comparing two datatables

Hello Uipath family,
Currently, I am trying to find the best way to compare two columns from two datatables and filter it to another datatable. Please see the example below:
First datatable:
image
Second datatable:
image
If category matches class I filter it to the third datatable:
image

Currently, my solution is to go throw two loops and compare if it matches by these columns, but if I have huge amount of data it is working too slow. Maybe someone has different ideas on how to achieve it in a more optimized way?

@Milda_x
For this scenario the Join task is used and can be done Join DataTable Activity or with LINQ

For an initial starter help on both find demo xaml here:
DT_Join_1Col.xaml (10.0 KB)