473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Performance of UDF Function ?

215 128KB
I know it's silly to ask this, but since I did not study any basis in Computer-code so I have 1 question about performance

1 big function contain every part on it
or combined multi function with each piece specialize to do its job

what method will be faster ?
Oct 26 '15 #1
3 991
zmbd
5,501 Expert Mod 4TB
Not an easy question to answer...

This would most likely depend upon the function and overall application.

In general, the more complex the code, the more of an impact one might expect; however, with today's desktop/laptop pc's the impact might not be noticeable to the end user. Also, once compiled, the impact is less noticeable.

With that said, "your mileage may vary."
Oct 28 '15 #2
TheSmileyCoder
2,322 Expert Mod 2GB
With multiple functions you will be passing around parameters, either ByVal or byref. So there is slightly more processing with multiple functions, as those variables are passed around, assigned to memory and cleaned up again.

However, the performance impact is often so small as to be completely neglible. Often we talk about whether it takes 50 mili-seconds or .55 miliseconds. Both appear instantaneous to the user, i.e. the user can not tell the difference.

But the readability and maintainability of your code is often increased significantly by dividing your code into more sections and/or functions.

In my experience the benefit of the maintainability far outweighs the performance in 95% of cases.

Also, don't spend time to optimize performance until you know you need to. Sure there is alot of code that could be optimized for 10% better performance, but the truth is that we very rarely need to.
Oct 28 '15 #3
hvsummer
215 128KB
@zmbd ok, I got it, thank you.
@The Smileycoder:
Well, actually, I'm on the way coding the multi-split-function for excel/access. And already finished all small parts, I'll rewrite the main function to use each part to co-op together.
I'll post it to insight section When I finish. (I did post 1 upgraded function that I copy from another guy in internet, still keep his name inside function and added my name to it.)
Oct 28 '15 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Alex Vinokur | last post by:
=================================== ------------- Sorting ------------- Comparative performance measurement =================================== Testsuite : Comparing Function Objects to...
5
by: pembed2003 | last post by:
Hi all, I need to write a function to search and replace part of a char* passed in to the function. I came up with the following: char* search_and_replace(char* source,char search,char*...
13
by: bjarne | last post by:
Willy Denoyette wrote; > ... it > was not the intention of StrousTrup to the achieve the level of efficiency > of C when he invented C++, ... Ahmmm. It was my aim to match the performance...
13
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
12
by: Tomás | last post by:
The common persuasion is: Big function -- leave it outline. Small function -- make it inline. In code I'm writing at the moment, I have a fairly long function, so it wouldn't cross my...
5
by: Markus Ernst | last post by:
Hello A class that composes the output of shop-related data gets some info from the main shop class. Now I wonder whether it is faster to store the info in the output class or get it from the...
0
by: Shades799 | last post by:
Hi All, I was wondering if any of you could help me with a very difficult problem that I am having. I have an ASP site that works with an Oracle database using an ADODB connection. This...
4
by: George2 | last post by:
Hello everyone, I want to know why virtual function's footprint and performance is compared with normal function call. Here is my analysis, please review whether I am correct. Thanks. 1....
5
by: Immortal Nephi | last post by:
I would like to design an object using class. How can this class contain 10 member functions. Put 10 member functions into member function pointer array. One member function uses switch to call...
3
by: RobG | last post by:
There has been a discussion on the iPhone web development group where an opinion has been expressed that function expressions are bad for performance and can be avoided by using function...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.