ATTINY85 with Virtualwire problems

I am trying to use Virtualwire with two ATTINY85s and 433MHz transmitter/receiver modules

The transmitting code works fine on the ATTINY88, and the receiver code works fine on a Nano. They talk to each other OK.

The same receiving code doesn't work at all on the ATTINY. It seems to be something to do with the clock.

To try to isolate the problem I wrote some very basic code

#include <VirtualWire.h>


int led = 4;
int x;
int y;

void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT); 
  pinMode(2, INPUT_PULLUP);
  vw_set_ptt_inverted(true); // Required for DR3100
  vw_set_rx_pin(2);
  vw_setup(8000);  // Bits per sec
  vw_rx_start();       // Start the receiver PLL running  
}

void loop() {

  x=4;
  for (y=0; y<x; y++) {
  digitalWrite(led, HIGH);   
  delay(200);               
  digitalWrite(led, LOW);    
  delay(200);               
}
delay (1000);
}

As you see, the loop just blinks the LED four times and then pauses. It has nothing to do with Virtualwire. But to get the LED to blink at the right rate, I have to set vw_setup at about 8000, which is faster than is practical. If I set it to, say, 2000, the LED blinks very rapidly. If I comment out that line altogether, the LED does what it's supposed to. I can't really see why the receiving bit rate should cause the rest of the code to operat at a different speed.

The ATTINY85 clock is set to 8MHz which I did via the bootloader - think I've got this right.

I am pretty new to all this so please be gentle.
Thank you

OK I have solved this in a very inelegant way, by massively increasing the delays by a factor of about 100. It works, but I'm sure there's a better solution.

I got a problem with delay() too. In my case, a ATTINY85 at 8Mhz internal, the thing stops at the first delay function, if i have no delays, it works just fine. If Ihave delays and do not set the vw_setup() it works again.
I couldn't find a relationship between the use of delay and vw_setup.