How to Choose Between VALUES and SELECT for INSERT?
The measured difference is almost certainly noise. Run some more iterations, you won't get consistent result. The difference in performance (if any exists) won't be measurable.

You can use either method here. Both are equally good for the purpose.
There are often multiple ways in SQL. And sometimes there is no clear winner.

The more important issue concerning performance here:


  100k of such INSERTs done per cycle


For big bulk-inserts it would be faster to INSERT in both tables instead of firing a trigger for every row.

If you are using a serial PK that's generated automatically, you can employ the RETURNING clause in a data-modifying CTE

WITH ins1 AS (
   INSERT INTO measurement (measurement)
   VALUES ...   -- OR SELECT ... if data comes from inside the DB :)
   RETURNING measurement_id  -- generating a serial ID?
   )
INSERT INTO file_headers (measurement_id, file_header_index_start, file_header_index_end)
SELECT measurement_id,  1, 666  -- here it *must* be SELECT
FROM   ins1;


A numerical constant like 666 (no quotes, just digits)  defaults to type integer automatically.

May not be applicable, depending on your workflow.

Related:


Bulk insert in multiple tables