# Foever Block vs Run In Background

**URL:** <https://forum.makecode.com/t/foever-block-vs-run-in-background/12419>\
**Category:** micro:bit\
**Created:** [February 28, 2022, 4:24pm UTC](https://forum.makecode.com/t/foever-block-vs-run-in-background/12419 "2022-02-28T16:24:21Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![bsiever](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bsiever/32/1032_2.png) [@bsiever](https://forum.makecode.com/u/bsiever)\
**Post date:** [April 13, 2024, 1:22am UTC](https://forum.makecode.com/t/foever-block-vs-run-in-background/12419/10 "2024-04-13T01:22:36Z")

</div>

@Vegz78 Here’s the prior, related discussion: [Micro:bit analog read is agonizingly slow?](https://forum.makecode.com/t/micro-bit-analog-read-is-agonizingly-slow/22028) (my [first reply](https://forum.makecode.com/t/micro-bit-analog-read-is-agonizingly-slow/22028/3) and [second reply](https://forum.makecode.com/t/micro-bit-analog-read-is-agonizingly-slow/22028/5))

As part of that discussion I created a “faster forever” that has less of a delay and, consequently, is a little faster. It’s merely a proof-of-concept, but it’s at: [https://github.com/bsiever/pxt-fastloops](https://github.com/bsiever/pxt-fastloops) . There are two variations: a `fast forever` that can run about 250 times per second (depending on the code within it) and a `faster forever with pause` that can be even faster, but it’s more likely to starve out other tasks or miss events.

I was also starting on a variation that’s here: [https://github.com/bsiever/pxt-fiberutils](https://github.com/bsiever/pxt-fiberutils) … It’s a little faster (360Hz), but doesn’t detect most events. It seems like the additional difficulty of using it would outweigh any benefits in most cases. (If/when time permits, I may look into event handling a bit more)

---

_[View the full topic](https://forum.makecode.com/t/foever-block-vs-run-in-background/12419)._
