Good book/reference for AVR coding in pure C/C++?
First, let's make this clear: The Arduino environment does not provide a
“simplified language”: it provides a simple hardware abstraction layer
through its core library. The language is plain C++.

Like Talk2, I don't have good book recommendations. The basics of
low-level programming are covered in the Arduino tutorial on port
manipulation[]. Past this you will have to dig into the datasheet of
your MCU. Look also at the doc of the avr-libc and the tutorials in
Nick Gammon's microprocessors pages.

I would suggest you try to develop your program like this:


Do the initial prototype of your idea on an Arduino Uno (or similar)
using the Arduino libraries. It just makes things easier, and you are
more likely to get a working prototype pretty fast.
Once the initial idea works, optimize it for the limited resources of
the ATtiny85. This may involve replacing some call to the Arduino
libs with avr-libc and/or direct port access.
You may then want to remove all references to Arduino core, but you
don't have to: there are some ATtiny cores available that you can use
if you want.
If it now fits in less than 8 K, port to the ATtiny.


The thing I love about the Arduino environment is that you can very
easily mix and match abstraction levels: you can have, in the same
program, calls to Arduino core, to avr-libc, direct port access, and
even inline assembly if want to. You don't even need to stick to the
setup() and loop() method: you can write your own main() if you
prefer, just remember to call init() to initialize the Arduino core if
you are going to use it. Oh, and you don't have to use the Arduino IDE
either if you don't like it (I don't).

As for the optimization tips, I would recommend :


Use direct port access instead of digitalRead(), because that
function is pretty big and slow.
analogRead() may not be that bad, size wise, but it has a serious
shortcoming: it's a blocking function which spends 104&nbsp;µs in a
spin loop, just waiting for the ADC result. If your CPU has better
things to do, you may want to implement a non-blocking read instead.
For debugging output, the most efficient option is likely to be the
USI port. You will have to search for a driver or implement your own
based on the Atmel application note AVR307: Half Duplex UART Using
the USI Module. Alternatively, you could use something like
AltSoftSerial. Do not use SoftwareSerial: it blocks interrupts for
insanely long amounts of time.
Use the command avr-nm --size-sort -Crtd my_program.elf to get a
listing of the functions of your program sorted by flash usage. This
will help you choose good targets for size optimization.