question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could we consider the inclusion of string types? It may be an immutable subtype of extern.

String type marker:

arg = ""+arg;

It would have the following expressions:

  • str.length: size of the string (a constant). Type: unsigned.
  • str.charCodeAt(index): character code, a nonnegative integer less than 2^16. Type: (unsigned) → fixnum.

This is motivated by the idea that converting an external string into a typed array before passing it in an asm.js exported function is probably not the most efficient approach. Yet, in my experience, string parsing in JS can be boosted a lot.

Issue Analytics

  • State:open
  • Created 11 years ago
  • Comments:30

github_iconTop GitHub Comments

1reaction
trusktrcommented, Jan 6, 2016

Out of curiosity, what are you guys planning to make (or have made) with asm.js + StringView?

0reactions
martingalacommented, Jun 11, 2013

@cscott P.S. I have updated the StringView page on MDN with your suggestions. I have also updated the makeIndex() method ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays/StringView#StringView.prototype.makeIndex() ) Bye 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

String Data Type – Programming Fundamentals - Rebus Press
A string data type is traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter...
Read more >
Character string data types - IBM
Character strings are the most commonly used data types. They can hold any sequence of letters, digits, punctuation, and other valid characters.
Read more >
MySQL 8.0 Reference Manual :: 11.3 String Data Types
The string data types are CHAR , VARCHAR , BINARY , VARBINARY , BLOB , TEXT , ENUM , and SET . For...
Read more >
C++ String Data Type - W3Schools
The string type is used to store a sequence of characters (text). This is not a built-in type, but it behaves like one...
Read more >
String Data Type - Visual Basic | Microsoft Learn
Use the String data type to hold multiple characters without the array management overhead of Char() , an array of Char elements.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found