TF-Lite is 4x slower than Tensorflow on MacOS (and 2x slower in Colab)
I am able to replicate locally on an Apple M1 Pro, MacOS Ventura 13.3.1, Tensorflow==2.13.0-rc0

My results are a little different but the qualitative result is similar:

Processed an image of shape (1080, 1920, 3) in 0.047 seconds
Tensorflow Model execution stats:
  Fraction of time spent detecting: 78%
  Average time per frame (ms): 17
  Average FPS: 58.99
  Median time per frame (ms): 16
  Median FPS: 60.69
TFLite Model execution stats:
  Fraction of time spent detecting: 91%
  Average time per frame (ms): 47
  Average FPS: 21.29
  Median time per frame (ms): 47
  Median FPS: 21.40
Tensorflow is 2.77x times faster than TFLite Thanks for confirming the issue

To answer my previous question "If this slowdown is unavoidable - is there some other way to serialize tensorflow functions so that they can be loaded again without slowdown?"

Yes, just use `tf.saved_model.save` instead of `tf.lite.TFLiteConverter.convert`.

However, it would still be good have tflite running at a reasonable speed on Mac (I also observe about a 1.8x slowdown on windows vs pure tensorflow)

 Hi @qukhan, Can you please take a look? @qukhan @pkgoogle I have similar observations, and in my case TF Lite performs 6x slower than TensorFlow and 17x slower than pytorch. You can find the demo colab [here](https://colab.research.google.com/drive/1escz78h-L0Puhc-POKAsb4f-olpQ9Lnu?usp=sharing). 

The colab simply creates a sequential model of 4 `Dense` layers with 512 units in `pytorch` and `tensorflow`. And tests them with `4x1024x512` input tensor. Here are the test cases:
* TensorFlow Eager execution
* `torch`
* TensorFlow with `tf.function`
* TF Lite
*  ONNX runtime with onnx model converted from the `torch` model

And here are the results:

| Method | M2 Pro | Colab x86_64 |
|--------|--------|--------|
| TF Eager | 53.4 it/s | 4.6 it/s |
| torch | 143.7 it/s | 7.0 it/s |
| `tf.function` | 55.1 it/s | 6.7 it/s |
| TF Lite | 8.3 it/s | 3.5 it/s |
| ONNX runtime | 50.1 it/s | 6.7 it/s | 

As one can see, TF Lite underperforms significantly on both M2 Pro and x86 processor in the colab. I could think that the performance issue in colab is caused by the lack of optimization for x86, but M2 pro is an arm64 processor and I think it should have no performance degradation on that.
Problem - Running a model with TFLite is 4x slower than running with tensorflow on my M1 MacOS.  

### 1. System information

- OS Platform and Distribution: **MacOS Ventura 13.2, on Apple M1 Macbook Air**
- TensorFlow installation (pip package or built from source): **2.9.1, from pip**

### 2. Code

Running the code in [this Colab notebook](https://colab.research.google.com/drive/1KFYbdxZicG2sQlw2kD63TM63gGm5VQJC?usp=sharing ), on MacOS, gives:

```
Tensorflow Model execution stats:
  Fraction of time spent detecting: 81%
  Average time per frame (ms): 19
  Average FPS: 52.10
  Median time per frame (ms): 19
  Median FPS: 52.33
TFLite Model execution stats:
  Fraction of time spent detecting: 95%
  Average time per frame (ms): 86
  Average FPS: 11.69
  Median time per frame (ms): 85
  Median FPS: 11.74
  
Tensorflow is 4.46x times faster than TFLite
```
... Clearly TFLite is much slower.

If I run it it in Colab, notebook, TFLite is still about 1.8x slower.

What is going on here?  I would expect TFLite to be faster.  Can this be fixed by adjusting some flags somewhere?

This has been noticed before - [see Stackoverflow question](https://stackoverflow.com/questions/54093424/why-is-tensorflow-lite-slower-than-tensorflow-on-desktop?rq=2).

**If this slowdown is unavoidable - is there some other way to serialize tensorflow functions so that they can be loaded again without slowdown?**