filter on get_posts efficiently

You could use a taxonomy query to make it cleaner and easier to read; I’m not sure if this would be any faster than the way you’re doing it, though.

$args = array(
    'tax_query' => array(
        'relation' => 'AND',
        array(
            'taxonomy' => 'category',
            'field'    => 'name',
            'terms'    => array( 'Europe', 'local' ),
            'operator' => 'IN',
        ),
        array(
            'taxonomy' => 'category',
            'field'    => 'name',
            'terms'    => array( '2017', '2018' ),
            'operator' => 'IN',
        ),
    ),
    'per_page' => 10000,
);
$posts = get_posts( $args );

…should get you any posts (well, the first 10000 posts) that are in ( ( 2017 || 2018 ) && ( Europe || local ) ). (I think; the code is untested, so you may have to tweak it.)