improve set prototype chain performance

On my Mac OS, the benchmark result is:

before:

```javascript
  1 middleware
  6527.24

  5 middleware
  6170.98

  10 middleware
  6123.54

  15 middleware
  6169.90

  20 middleware
  5985.76

  30 middleware
  5832.96

  50 middleware
  5594.65

  100 middleware
  5148.62
```

after:

```javascript
  1 middleware
  5683.58

  5 middleware
  5987.54

  10 middleware
  6065.03

  15 middleware
  6042.75

  20 middleware
  6042.96

  30 middleware
  5729.14

  50 middleware
  5659.19

  100 middleware
  5081.91
```