[jira] [Updated] (IMPALA-12373) Implement Small String Optimization for StringValue

2023-08-17 Thread Jira


 [ 
https://issues.apache.org/jira/browse/IMPALA-12373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zoltán Borók-Nagy updated IMPALA-12373:
---
Labels: Performance  (was: )

> Implement Small String Optimization for StringValue
> ---
>
> Key: IMPALA-12373
> URL: https://issues.apache.org/jira/browse/IMPALA-12373
> Project: IMPALA
>  Issue Type: Improvement
>Reporter: Zoltán Borók-Nagy
>Priority: Major
>  Labels: Performance
> Attachments: small_string.cpp
>
>
> Implement Small String Optimization for StringValue.
> Current memory layout of StringValue is:
> {noformat}
>   char* ptr;  // 8 byte
>   int len;// 4 byte
> {noformat}
> For small strings with size up to 8 we could store the string contents in the 
> bytes of the 'ptr'. Something like that:
> {noformat}
>   union {
> char* ptr;
> char small_buf[sizeof(ptr)];
>   };
>   int len;
> {noformat}
> Many C++ string implementations use the {{Small String Optimization}} to 
> speed up work with small strings. For example:
> {code:java}
> Microsoft STL, libstdc++, libc++, Boost, Folly.{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org



[jira] [Updated] (IMPALA-12373) Implement Small String Optimization for StringValue

2023-08-17 Thread Jira


 [ 
https://issues.apache.org/jira/browse/IMPALA-12373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zoltán Borók-Nagy updated IMPALA-12373:
---
Attachment: small_string.cpp

> Implement Small String Optimization for StringValue
> ---
>
> Key: IMPALA-12373
> URL: https://issues.apache.org/jira/browse/IMPALA-12373
> Project: IMPALA
>  Issue Type: Improvement
>Reporter: Zoltán Borók-Nagy
>Priority: Major
> Attachments: small_string.cpp
>
>
> Implement Small String Optimization for StringValue.
> Current memory layout of StringValue is:
> {noformat}
>   char* ptr;  // 8 byte
>   int len;// 4 byte
> {noformat}
> For small strings with size up to 8 we could store the string contents in the 
> bytes of the 'ptr'. Something like that:
> {noformat}
>   union {
> char* ptr;
> char small_buf[sizeof(ptr)];
>   };
>   int len;
> {noformat}
> Many C++ string implementations use the {{Small String Optimization}} to 
> speed up work with small strings. For example:
> {code:java}
> Microsoft STL, libstdc++, libc++, Boost, Folly.{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org



[jira] [Updated] (IMPALA-12373) Implement Small String Optimization for StringValue

2023-08-16 Thread Jira


 [ 
https://issues.apache.org/jira/browse/IMPALA-12373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zoltán Borók-Nagy updated IMPALA-12373:
---
Description: 
Implement Small String Optimization for StringValue.

Current memory layout of StringValue is:
{noformat}
  char* ptr;  // 8 byte
  int len;// 4 byte
{noformat}
For small strings with size up to 8 we could store the string contents in the 
bytes of the 'ptr'. Something like that:
{noformat}
  union {
char* ptr;
char small_buf[sizeof(ptr)];
  };
  int len;
{noformat}
Many C++ string implementations use the {{Small String Optimization}} to speed 
up work with small strings. For example:
{code:java}
Microsoft STL, libstdc++, libc++, Boost, Folly.{code}

  was:
Implement Small String Optimization for StringValue.

Current memory layout of StringValue is:
{noformat}
  char* ptr;  // 8 byte
  int len;// 4 byte
{noformat}
For small strings with size up to 8 we could store the string contents in the 
bytes of the 'ptr'. Something like that:
{noformat}
  union {
char* ptr;
char small_buf[sizeof(ptr)];
  }
  int len;
{noformat}
Many C++ string implementations use the {{Small String Optimization}} to speed 
up work with small strings. For example: {code}Microsoft STL, libstdc++, 
libc++, Boost, Folly.{code}



> Implement Small String Optimization for StringValue
> ---
>
> Key: IMPALA-12373
> URL: https://issues.apache.org/jira/browse/IMPALA-12373
> Project: IMPALA
>  Issue Type: Improvement
>Reporter: Zoltán Borók-Nagy
>Priority: Major
>
> Implement Small String Optimization for StringValue.
> Current memory layout of StringValue is:
> {noformat}
>   char* ptr;  // 8 byte
>   int len;// 4 byte
> {noformat}
> For small strings with size up to 8 we could store the string contents in the 
> bytes of the 'ptr'. Something like that:
> {noformat}
>   union {
> char* ptr;
> char small_buf[sizeof(ptr)];
>   };
>   int len;
> {noformat}
> Many C++ string implementations use the {{Small String Optimization}} to 
> speed up work with small strings. For example:
> {code:java}
> Microsoft STL, libstdc++, libc++, Boost, Folly.{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org



[jira] [Updated] (IMPALA-12373) Implement Small String Optimization for StringValue

2023-08-16 Thread Jira


 [ 
https://issues.apache.org/jira/browse/IMPALA-12373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zoltán Borók-Nagy updated IMPALA-12373:
---
Description: 
Implement Small String Optimization for StringValue.

Current memory layout of StringValue is:
{noformat}
  char* ptr;  // 8 byte
  int len;// 4 byte
{noformat}
For small strings with size up to 8 we could store the string contents in the 
bytes of the 'ptr'. Something like that:
{noformat}
  union {
char* ptr;
char small_buf[sizeof(ptr)];
  }
  int len;
{noformat}
Many C++ string implementations use the {{Small String Optimization}} to speed 
up work with small strings. For example: {code}Microsoft STL, libstdc++, 
libc++, Boost, Folly.{code}


  was:
Implement Small String Optimization for StringValue.

Current memory layout of StringValue is:
{noformat}
  char* ptr;  // 8 byte
  int len;// 4 byte
{noformat}
For small strings with size up to 8 we could store the string contents in the 
bytes of the 'ptr'. Something like that:
{noformat}
  union {
char* ptr;
char small_buf[sizeof(ptr)];
  }
  int len;
{noformat}
Many C++ string implementations use the {{Small String Optimization}} to speed 
up work with small strings. For example: {{{}Microsoft STL{}}}, 
{{{}libstdc++{+}{+}{}}}, {{{}libc++{}}}, {{{}Boost{}}}, {{{}Folly{}}}.


> Implement Small String Optimization for StringValue
> ---
>
> Key: IMPALA-12373
> URL: https://issues.apache.org/jira/browse/IMPALA-12373
> Project: IMPALA
>  Issue Type: Improvement
>Reporter: Zoltán Borók-Nagy
>Priority: Major
>
> Implement Small String Optimization for StringValue.
> Current memory layout of StringValue is:
> {noformat}
>   char* ptr;  // 8 byte
>   int len;// 4 byte
> {noformat}
> For small strings with size up to 8 we could store the string contents in the 
> bytes of the 'ptr'. Something like that:
> {noformat}
>   union {
> char* ptr;
> char small_buf[sizeof(ptr)];
>   }
>   int len;
> {noformat}
> Many C++ string implementations use the {{Small String Optimization}} to 
> speed up work with small strings. For example: {code}Microsoft STL, 
> libstdc++, libc++, Boost, Folly.{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org