[CDRIVER-1097] bson_oid_to_string does not use fast-path code with Visual Studio Created: 09/Feb/16 Updated: 10/Aug/16 Resolved: 11/Mar/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libbson |
| Affects Version/s: | 1.3.2 |
| Fix Version/s: | 1.4.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Maverick Chan | Assignee: | Hannes Magnusson |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Visual Studio 12 2013 Win64 |
||
| Attachments: |
|
| Backwards Compatibility: | Fully Compatible |
| Description |
|
Commit (8d7a2b7cdd429d6d5a7853848a804b29ab619b1a) added a #define guard for the fast-path code for bson_oid_to_string that ensured it was only enabled on x86 platforms. When I build on Windows, this fast-path code is not enabled (see the first line of bson_oid_to_string): #if !defined(__i386__) && !defined(__x86_64__) Neither of these macros is defined by Visual Studio. |
| Comments |
| Comment by Maverick Chan [ 15/Mar/16 ] |
|
Cool, thanks for reviewing! |
| Comment by Hannes Magnusson [ 11/Mar/16 ] |
|
Thanks for the patch! |
| Comment by Githook User [ 11/Mar/16 ] |
|
Author: {u'name': u'Maverick Chan', u'email': u'maverickc@simba.com'}Message: |
| Comment by Maverick Chan [ 24/Feb/16 ] |
|
We've found that this is a bottleneck in our Windows application, and we can work around it with a patch (hopefully I can attach it). I'm not well-versed in C, but I think the portable way to write the method would be with memcpy instead of type-punning. |