Comments (2)
Sometimes I pass raw data as a string and whatever process adds the null can add an unwanted byte or unwanted time to my program. I'm not sure if programs that don't expect it to be there can have some idea it is there.
Most of the time it's graphics, palette or sound data.
Anyways the process of adding it can affect performance.
from qb64pe.
Can you clarify what your concern is? This would not impact the length of the string, only the actual char *
buffer passed to the library function, and it would be added at the time of the call and thus invisible from the QB64 code (this only applies to external calls to DECLARE LIBRARY
functions).
If you're currently passing a string along with the length to a DECLARE LIBRARY
function then this has no impact you, because the length you'll send stays the same and the NUL character would be the character past the end of the length you sent to the function.
In terms of performance I don't think that's a significant concern here (especially compared to the number of buggy programs I've seen the don't add the NUL byte), but also qbs
could definitely be modified to simply maintain the NUL byte itself, which would avoid any real performance penalty for having the NUL byte on the end.
from qb64pe.
Related Issues (20)
- Max number of subs and functions in entire program limited to `1000` HOT 3
- Another Suggestion. HOT 6
- `display_page` is used and modified by multiple threads with no synchronization
- Use discussions on GitHub in addition to the MyBB forum
- $Embed and _Embed HOT 2
- Alternate ENVIRON syntax does not work on Linux
- v3.9.1 Save (Save As) bug with file name extensions
- $IF precompiler still does syntax checking on non-valid blocks (and adds extra spaces to invalid blocks) HOT 1
- Add optional image_handle to various graphic commands.
- Console on Windows HOT 5
- Add Automatic Closing
- Variable-Length Strings HOT 2
- Ternary Operator '?' HOT 3
- The GLUT thread does not accurately redraw at 60 FPS
- Provide a way to wait for the current queued frame to be rendered on screen.
- I need help with beep, sound, and play HOT 2
- _BUTTON and _DEVICEINPUT does not register keyboard inputs on Linux
- Refactor `gfs` into separate source files in `libqb/`
- IDE option to always recompile current program even if the editor does not detect changes HOT 1
- Refactor built-in font related functions into separate source files in `libqb/`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qb64pe.