Yes, The pin mapping on the ESP8266 is handled differently and more efficiently than on many other arduino boards.
How it is done varies depending on the specific ESP8266 board. (they don't all do it the same way)
On all esp8266 Arduino boards, naked constants like 0, 1, 2, etc... map directly to the GPIO bit number.
But some boards also use Dn defines to map between the Arduino pin numbers and GPIO bit numbers.
If you have a board that uses Dn defines (D0, D1, D2, D15, etc...) then as PieterP pointed out, pin Dn is not necessarily, and quite often, not the same as pin n.
i.e. on boards that use Dn defines, D1 is often not the same physical pin on the board as 1
Some esp8266 boards use the Dn pin mappings, and some done.
And boards that use Dn pin mapping don't all do it the same way.
So it is a bit of a wreck.
The one saving grace is that ESP8266 boards tend to label the pins in a way that if you use the name on the label for the pin,
D1, D2, ... ,D7or 1, 2, ... 7, etc... then you will access the pin with that label.