# Pros and Cons about using "custom" Functions vs the basic set of nodes

**URL:** <https://discourse.nodered.org/t/pros-and-cons-about-using-custom-functions-vs-the-basic-set-of-nodes/2959>\
**Category:** General\
**Created:** [8 September 2018 00:34 UTC](https://discourse.nodered.org/t/pros-and-cons-about-using-custom-functions-vs-the-basic-set-of-nodes/2959 "2018-09-08T00:34:17Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [14 September 2018 14:20 UTC](https://discourse.nodered.org/t/pros-and-cons-about-using-custom-functions-vs-the-basic-set-of-nodes/2959/24 "2018-09-14T14:20:52Z")

</div>

I've just pushed a fix to git that restores the performance of the Switch node:

| Number of messages | Function Time (ms) | Switch Time (ms) |
| --- | --- | --- |
| 16384 | 1216 | 331 |
| 32768 | 2081 | 600 |
| 65536 | 4125 | 1124 |
| 131072 | 8282 | 2207 |

This fix only applies if the node doesn't try to access context.

I suspect a similar performance regression will have been introduced to the Change node - I'll sort that out next.

---

_[View the full topic](https://discourse.nodered.org/t/pros-and-cons-about-using-custom-functions-vs-the-basic-set-of-nodes/2959)._
